如何附加和分离Docker的流程? [英] How do you attach and detach from Docker's process?

查看:95
本文介绍了如何附加和分离Docker的流程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以附加到docker进程,但是 Ctrl + c 无法从中分离。 exit 基本上停止了这个过程。

I can attach to a docker process but Ctrl+c doesn't work to detach from it. exit basically halts the process.

有什么建议的工作流程让进程运行,偶尔附加到它进行一些更改,然后分离?

What's the recommended workflow to have the process running, occasionally attaching to it to make some changes, and then detaching?

推荐答案

要在不退出shell的情况下分离tty,请使用转义序列 Ctrl + p + Ctrl < kbd> + q

To detach the tty without exiting the shell, use the escape sequence Ctrl+p + Ctrl+q.

这里有更多细节:
https://docs.docker.com/engine/reference/commandline/attach/

这篇关于如何附加和分离Docker的流程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆