diff --git a/gns3server/compute/docker/docker_vm.py b/gns3server/compute/docker/docker_vm.py index 55a38e0c..1e39e376 100644 --- a/gns3server/compute/docker/docker_vm.py +++ b/gns3server/compute/docker/docker_vm.py @@ -574,15 +574,9 @@ class DockerVM(BaseNode): # https://github.com/GNS3/gns3-gui/issues/1039 try: process = await asyncio.subprocess.create_subprocess_exec( - "docker", - "exec", - "-i", - self._cid, - "/gns3/bin/busybox", "script", "-qfc", - "while true; do TERM=vt100 /gns3/bin/busybox sh; done", - "/dev/null", + f"docker exec -i -t {self._cid} /gns3/bin/busybox sh -c 'while true; do TERM=vt100 /gns3/bin/busybox sh; done'", "/dev/null", stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.STDOUT, stdin=asyncio.subprocess.PIPE, diff --git a/gns3server/compute/docker/resources/bin/udhcpc b/gns3server/compute/docker/resources/bin/udhcpc new file mode 100644 index 00000000..fe1410a6 --- /dev/null +++ b/gns3server/compute/docker/resources/bin/udhcpc @@ -0,0 +1,8 @@ +#!/gns3/bin/busybox sh + +SCRIPT="/gns3/etc/udhcpc/default.script" +EXTRA="" + +[ "$(cat "/proc/$PPID/comm" 2>/dev/null)" = ifup ] && EXTRA="-t 3 -T 2 -A 1 -b" + +exec /tmp/gns3/bin/udhcpc -s "$SCRIPT" $EXTRA "$@"