62

Docker容器学习梳理--容器登陆方法梳理(attach、exec、nsenter)-眼眸刻着你的微笑-5...

 6 years ago
source link: http://blog.51cto.com/dengaosky/2067229
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容器,我们运维人员时常是有登陆进去的需求。登陆Docker容器的方式:1)使用ssh登陆容器。这种方法需要在容器中启动sshd,存在开销和攻击面增大的问题。同时也违反了Docker所倡导的一个容器一个进程的原则。 参考Docker容器学习梳理--SSH方式登陆容器2)使用自带命令docker attach登陆容器。命令格式:docker attach container

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK