A imagem do Docker CentOS não inicia automaticamente o httpd
Estou tentando executar uma imagem simples do Docker com o Apache e um programa PHP. Funciona bem se eu correr
docker run -t -i -p 80:80 my/httpd /bin/bash
depois inicie manualmente o Apache
service httpd start
no entanto, não consigo obter o httpd para iniciar automaticamente ao executar
docker run -d -p 80:80 my/httpd
O Apache será inicializado e o container existe. Eu tentei um monte de diferenteCMD
s no meu arquivo docker
CMD /etc/init.d/httpd start
CMD ["service" "httpd" "start"]
CMD ["/bin/bash", "/etc/init.d/httpd start"]
ENTRYPOINT /etc/init.d/httpd CMD start
CMD ./start.sh
start.sh é
#!/bin/bash
/etc/init.d/httpd start
No entanto, todas as instâncias do docker existirão após o início do apache
Estou perdendo algo realmente óbvio?