我在apache的http服务器的Image上创建了一个配置, 我已经安装了最后一张图片并在dockerfile中做了一些事情:
# Updated as of Aug 16, 2017
# FROM specified which image i want to download
# Needs to be provided before any other section of code.
FROM httpd:latest
#Author of the Docker File
MAINTAINER Pictolearn
# Copy the following directory
COPY pictolearn-sample/ /usr/local/apache2/htdocs/pictolearn
# Copy httpd.conf with changes to the root directory
COPY httpd.conf /usr/local/apache2/conf
我已经做了:
docker build -t my-httpd .
docker run -itd --name my-http-container-1 -p 5555:80 my-httpd:latest
但如果我采取的状态我有退出= 1
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED
STATUS PORTS NAMES
40dc04bcfb2a my-httpd:latest "httpd-foreground" 5
minutes ago Exited (1) 5 minutes ago my-
http-container-1
我不知道为什么它不起作用 这是日志结果:
AH00534: httpd: Configuration error: No MPM loaded.
答案 0 :(得分:2)
编辑httpd.conf并重播到
LoadModule mpm_event_module modules/mod_mpm_event.so
<强>更新强>
您可以在文件末尾添加,但添加到LoadModule周围更好。
之后删除容器和图像并重新重建