15
如何在后台模式下将bash或ssh放入正在运行的容器中?
我想ssh或bash到正在运行的docker容器中。请参见示例: $ sudo docker run -d webserver webserver is clean image from ubuntu:14.04 $ sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 665b4a1e17b6 webserver:latest /bin/bash ... ... 22/tcp, 80/tcp loving_heisenberg 现在我想得到这样的东西(进入正在运行的容器): $ sudo docker run -t -i webserver (or maybe 665b4a1e17b6 instead) $ root@665b4a1e17b6:/# However when I …