简体   繁体   English

在RedHat机器上的ubuntu Docker容器中运行apache

[英]Running apache in an ubuntu Docker container on a RedHat machine

I am new to Docker and have been trying to configure a standard default install of Apache2 running on the ubuntu:14.04 image. 我是Docker的新手,并一直在尝试配置在ubuntu:14.04映像上运行的Apache2的标准默认安装。

This seems to work just fine when the Docker host machine is running Ubuntu, but when I try to run this same config on a machine running RHEL 6, I get apache config errors having to do with file permissions. 当Docker主机运行Ubuntu时,这似乎工作得很好,但是当我尝试在运行RHEL 6的计算机上运行相同的配置时,我得到与文件权限有关的apache配置错误。 Specifically, the default apache page returns a 403 forbidden page. 具体来说,默认的apache页面返回403禁止页面。

I thought the point of Docker was that I could create a container on one environment and it should behave exactly the same on any other environment.. am I way off? 我认为Docker的重点是我可以在一个环境中创建一个容器,并且在其他任何环境中的行为应完全相同。

Not 100% sure, but it may be that you need RHEL 7. From here you can: 不确定100%,但是可能您需要RHEL7。在这里,您可以:

docker pull rhscl/httpd-24-rhel7 码头工人拉rhscl / httpd-24-rhel7

See https://access.redhat.com/solutions/1378023 参见https://access.redhat.com/solutions/1378023

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM