sudo
# install containernet (using its Ansible playbook)
-RUN git clone https://github.com/containernet/containernet.git
+# Attention: Containernet installation fixed to specific commit. Change to update to latest Containernet version.
+RUN git clone https://github.com/containernet/containernet.git && \
+ (cd containernet && git checkout bc269d6f1cf9f50f71fda65c25fe1f2f4c1573b7)
WORKDIR /containernet/ansible
RUN ansible-playbook -i "localhost," -c local --skip-tags "notindocker" install.yml
# Start the real emulator command now as specified in the dockerfile
config = c.dcinfo.get("Config", dict())
env = config.get("Env", list())
+ legacy_command_execution = False
for env_var in env:
var, cmd = map(str.strip, map(str, env_var.split('=', 1)))
if var == "SON_EMU_CMD" or var == "VIM_EMU_CMD":
t = threading.Thread(target=c.cmdPrint, args=(cmd,))
t.daemon = True
t.start()
+ legacy_command_execution = True
break # only execute one command
+ if not legacy_command_execution:
+ c.start()
def stop_compute(self, server):
"""
try:
config = c.dcinfo.get("Config", dict())
env = config.get("Env", list())
+ legacy_command_execution = False
for env_var in env:
var, cmd = map(str.strip, map(str, env_var.split('=', 1)))
logging.debug("%r = %r" % (var, cmd))
t = threading.Thread(target=c.cmdPrint, args=(cmd,))
t.daemon = True
t.start()
+ legacy_command_execution = True
+ break
+ if not legacy_command_execution:
+ c.start()
except Exception as ex:
logging.warning("Couldn't run Docker entry point VIM_EMU_CMD")
logging.exception("Exception:")