【发布时间】:2019-03-11 04:17:13
【问题描述】:
我目前在使用 Docker 时成功运行我的 apache 网络服务器时遇到问题...
这是我的 docker 文件:
FROM fedora:27
# Container Owner
MAINTAINER nzhiti@gmail.com
# Update & install Apache & clean dnf
RUN dnf upgrade -y
RUN dnf install -y httpd
RUN dnf clean packages
RUN dnf install -y mod_ssl
# Configuring hosts
ADD ./hosts/hosts /etc/hosts
# Port
EXPOSE 443
# Starting httpd
ENTRYPOINT ["/usr/sbin/httpd"] & CMD ["-D", "FOREGROUND"]
构建过程中没有错误。但是当我尝试编写它时,它永远不会起作用,并且输出的唯一消息是apache exiting with code 0
version: '3'
services:
php-apache:
image : httpd_fedora
ports:
- 443:443
volumes:
- ./Apache/www/:/var/www/html
- ./Apache/vhosts/:/etc/httpd/conf.d/
- ./Apache/SSLcert/:/etc/httpd/ssl/
- ./Apache/errorlogs/error.log:/var/log/httpd/error.log
tty: true
我没有想法......
谢谢, 德克
【问题讨论】:
标签: php apache docker fedora lamp