Docker运行Exited 1 httpd [英] Docker run Exited 1 httpd

查看:81
本文介绍了Docker运行Exited 1 httpd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在apache的http服务器的映像上创建了一个配置,我已经安装了最后一个映像,并在dockerfile中做了一些事情:

i have create a configuration on an Image of an http server of apache, i have install the last image and do some stuff in the 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

but if i take the status i have exit = 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

我不知道为什么它不起作用这就是日志结果:

i don't know why it dosn't work that's the logs result:

AH00534: httpd: Configuration error: No MPM loaded.

推荐答案

编辑httpd.conf并替换为

edit httpd.conf and replase to

LoadModule mpm_event_module modules/mod_mpm_event.so

更新

您可以在文件末尾添加,但最好添加到LoadModule的周围.

You can add at the end of the file, but add to around LoadModule's is better.

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

After that remove container and images and rebuild again

这篇关于Docker运行Exited 1 httpd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆