4

新手提问:如何退出 docker 容器而不让容器 exit

 1 year ago
source link: https://www.v2ex.com/t/887723
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  问与答

新手提问:如何退出 docker 容器而不让容器 exit

  proxytoworld · 10 分钟前 · 84 次点击

我用docker run -it -d -v path:path ubuntu:latest /bin/bash启动一个后台容器,然后 docker attach 进入容器内部 shell 中,每次我使用 exit 退出容器,docker ps -a 中该容器就会 exit ,由于我使用的是 mobaxterm ,没办法 ctrl p + ctrl q 退出。

还有什么办法可以退出容器不让容器 exit 呢


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK