dockerhttpd(pid1)alreadyrunning

分析原因是因为容器重启后 httpd.pid 未删除,导致重启的时候检测到 apache 服务在运行
error

超过十年行业经验,技术领先,服务至上的经营模式,全靠网络和口碑获得客户,为自己降低成本,也就是为客户降低成本。到目前业务范围包括了:做网站、成都网站建设,成都网站推广,成都网站优化,整体网络托管,重庆小程序开发公司,微信开发,App定制开发,同时也可以让客户的网站和网络营销和我们一样获得订单和生意!

httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
root@ubuntu:/var/lib/docker/overlay2#
docker container inspect 7e336d136e827e8b3daffbd80363d0daf4d0a40a54c5dfda85727bfdf1e9f7e5

docker httpd (pid 1) already running

搜索

root@ubuntu:/var/lib/docker/overlay2# find ./ -name apache2.pid

删除

root@ubuntu:/var/lib/docker/overlay2# rm -rf ./92cce34fc1ca4585ec25d729949f573a92b39ac0dd7f2fc8cc42b5a17016afb4/diff/run/apache2/apache2.pid

即可启动容器了

如果使用了容器编排的方式,请参考操作
https://forums.docker.com/t/httpd-already-running/33397


文章标题:dockerhttpd(pid1)alreadyrunning
分享地址:http://scyanting.com/article/ppjcos.html