我的httpd服务没有在容器重启时启动。
[root@dev devops_pratice]# cat Dockerfile
FROM custom_centos:6
VOLUME ["/opt/shared/finapp1usr/public_html","/var/www/html/","/opt/shared/finapp1usr/logs","/var/log/httpd"]
CMD ["service httpd start"]
EXPOSE 80 2000
=========================================== ======
[root@dev devops_pratice]# docker build -t custom_centos6:v7 .
Sending build context to Docker daemon 273.9kB
Step 1/4 : FROM custom_centos:6
---> 23bfa4993b72
Step 2/4 : VOLUME ["/opt/shared/finapp1usr/public_html","/var/www/html/","/opt/shared/finapp1usr/logs","/var/log/httpd"]
---> Using cache
---> de74675b273a
Step 3/4 : CMD ["service httpd start"]
---> Using cache
---> 6b77b5b11feb
Step 4/4 : EXPOSE 80 2000
---> Using cache
---> 55975ece7996
Successfully built 55975ece7996
Successfully tagged custom_centos6:v7
=========================================== ======
[root@dev devops_pratice]# docker run -dit --name financeapp1 --restart unless-stopped custom_centos6:v7 /bin/bash
c46bb112d9edb2f42a28c94d028a9cb2bc0903a10879d44dc15e2445fd584b45
=========================================== ======
[root@dev devops_pratice]# docker exec financeapp1 service httpd status
httpd dead but pid file exists
================================================ ====== 有什么想法吗?