69

docker attach 正确用法-梦想照进现实

 6 years ago
source link: http://blog.51cto.com/lookingdream/2073986
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.
当docker容器在“-d”守护态运行的时候,比如通过supervisord控制两个程序非守护态运行:ssh-Dtomcat那么这个时候,用户就无法直接进入到容器中去,dockerattach容器id就会一直卡着。因为此时容器运行的进程是ssh,而不是/bin/bash也没有虚拟终端(-it)参数,所以是进入不到的,那么这种情况下,该如何attach进去并进入到一个/bin/bash里呢?可以用d

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK