我使用为基础的php docker container与标签:如何重新启动apache2而不会崩溃码头集装箱?
php:5.6-apache
当我试图重新启动容器内的Apache2,容器停止:
[email protected]:/var/www/html# service apache2 restart
Restarting web server: apache2Terminated
[email protected]:/var/www/html#
[email protected]:
如何重新启动的Apache2不停止容器?
我要玩的容器和定制它,我把我变成了dockerfile之前。我想安装一些扩展并为他们工作我需要重新启动Apache以使更改生效。
立即停止信号:
Attaching to dltasklight_phlaconapp_1
phlaconapp_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
phlaconapp_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
phlaconapp_1 | [Mon May 30 10:19:24.556154 2016] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.10 (Debian) PHP/5.6.22 configured -- resuming normal operations
phlaconapp_1 | [Mon May 30 10:19:24.556181 2016] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
phlaconapp_1 | [Mon May 30 10:21:11.754993 2016] [mpm_prefork:notice] [pid 1] AH00169: caught SIGTERM, shutting down
dltasklight_phlaconapp_1 exited with code 0
这就是我在开发dev堆栈时所做的。感谢您写出来和+1。我不接受这个解决方案,因为运行重新加载并不是最终的要求,就好像扩展在Apache启动之前安装一样,它不需要重新启动它。 – k0pernikus
接受了这个答案,因为除了这个问题之外,其他未知的答案还在继续。重新启动不是必需的,重新加载配置,这帮助我构建了一个合适的Dockerfile。 – k0pernikus
好。我不记得有另一个命令只能作为apache配置重新启动。这个命令对于这个问题非常有用:} –