Docker CentOS image does not auto start httpd
You need to run apache (httpd) directly - you should not use init.d script.
Two options:
- you have to run apache in foreground:
/usr/sbin/apache2 -DFOREGROUND ...
(or /usr/sbin/httpd in CentOS) - you have to start all services (including apache configured as auto-run) by executing
/sbin/init
as entrypoint.
Add this line in the bottom of your Dockerfile
to run Apache in the foreground on CentOS
ENTRYPOINT ["/usr/sbin/httpd", "-D", "FOREGROUND"]