dockerfile - docker 以-d模式启动时闪退的问题,docker桥接网络的问题
PHP中文网
PHP中文网 2017-04-21 11:17:33
0
1
1064

最近研究docker。遇到一些问题,希望高手指点
在docker安装好后。并启动docker后。在运行容器的时候出现了问题。当以-d参数以后端进程方式启动的时候。容器在启动的时候会断掉。

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
大家讲道理

This is probably because the container exited immediately after it was started.

If you want to get a shell, you should execute:

docker run -it centos /bin/bash

If you want to run in the background, you need to start a process that will not hang, such as:

docker run -d centos /usr/bin/supervisord

If you want to start a shell as a daemon, docker cannot do it. You can refer to this question:

/q/1010000000424935

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template