diff --git a/gns3server/modules/docker/docker_vm.py b/gns3server/modules/docker/docker_vm.py index ddb01e1e..ca60bbd5 100644 --- a/gns3server/modules/docker/docker_vm.py +++ b/gns3server/modules/docker/docker_vm.py @@ -338,11 +338,11 @@ class DockerVM(BaseVM): # We can not use the API because docker doesn't expose a websocket api for exec # https://github.com/GNS3/gns3-gui/issues/1039 process = yield from asyncio.subprocess.create_subprocess_exec( - "docker", "exec", "-i", self._cid, "/gns3/bin/busybox", "sh", "-i", + "docker", "exec", "-i", self._cid, "/gns3/bin/busybox", "script", "-qfc", "/gns3/bin/busybox sh", "/dev/null", stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.STDOUT, stdin=asyncio.subprocess.PIPE) - server = AsyncioTelnetServer(reader=process.stdout, writer=process.stdin, binary=False, echo=False) + server = AsyncioTelnetServer(reader=process.stdout, writer=process.stdin, binary=True, echo=True) self._telnet_servers.append((yield from asyncio.start_server(server.run, self._manager.port_manager.console_host, self.aux))) log.debug("Docker container '%s' started listen for auxilary telnet on %d", self.name, self.aux) diff --git a/gns3server/modules/docker/resources/bin/busybox b/gns3server/modules/docker/resources/bin/busybox index 08235d5e..50aa17f6 100755 Binary files a/gns3server/modules/docker/resources/bin/busybox and b/gns3server/modules/docker/resources/bin/busybox differ diff --git a/gns3server/utils/asyncio/telnet_server.py b/gns3server/utils/asyncio/telnet_server.py index 783f0970..c58af69d 100644 --- a/gns3server/utils/asyncio/telnet_server.py +++ b/gns3server/utils/asyncio/telnet_server.py @@ -15,6 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +import re import asyncio import asyncio.subprocess