dockerのphp-apacheイメージでのapache再起動


やりたこと

dockerのphp-apacheイメージで不意にapacheが停止した場合、apacheを起動したい。

環境

  • dockerimage php:7.4-apache

コマンド

service apache2 start

以下はダメ。

service httpd start
httpd: unrecognized service
/etc/init.d/httpd start
bash: /etc/init.d/httpd: No such file or directory
apachectl start
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.24.0.2. Set the 'ServerName' directive globally to suppress this message

php:7.4-apacheがDebianだからとかなのかhttpdが使えなくて困った。

cat /etc/issue
Debian GNU/Linux 10 \n \l