Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux Docker运行已退出1 httpd_Linux_Apache_Shell_Http_Docker - Fatal编程技术网

Linux Docker运行已退出1 httpd

Linux Docker运行已退出1 httpd,linux,apache,shell,http,docker,Linux,Apache,Shell,Http,Docker,我在apache的http服务器映像上创建了一个配置, 我已经安装了最后一个映像,并在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 MAINTAI

我在apache的http服务器映像上创建了一个配置, 我已经安装了最后一个映像,并在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.

编辑httpd.conf并重放到

LoadModule mpm_event_module modules/mod_mpm_event.so
更新

您可以在文件末尾添加,但在LoadModule的周围添加会更好


之后,移除容器和图像并再次重建

之后,我必须重建图像?顺便说一下,我可以把这个字符串放在文件的末尾,还是无关紧要?