Attach模式Detach模式 Attach模式 前台执行模式命令行的输入会直接传到docker容器里面,比如Linux系统中运行容器时输入ctrl+c便会停止容器运行 不推荐使用attach模式 Detach模式 后台执行模式docker run -d -p 80:80 nginx,-d即为--detach后台运行重新进行attach模式 docker attach <container ID>