Created
June 7, 2014 17:06
-
-
Save trevorjay/485ed2bbbbf07ed25f97 to your computer and use it in GitHub Desktop.
Dockerfile that will create a running apache built from the GA RHEL image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rhel-server:latest | |
RUN yum -y update; yum clean all | |
RUN yum -y install httpd; yum clean all | |
RUN echo "<html><body><h1>Who is Shadowman?</h1></body></html>" > /var/www/html/index.html | |
RUN sed -ri 's/#OPTIONS=/OPTIONS=-DFOREGROUND/' /etc/sysconfig/httpd | |
RUN sed -ri -e 's/User apache/User nobody/' -e 's/Group apache/Group nobody/' /etc/httpd/conf/httpd.conf | |
RUN echo -e "#!/bin/bash\n\nrm -rf /run/httpd/*\nexec /usr/sbin/apachectl" > /run.sh | |
RUN chmod -v +x /run.sh | |
EXPOSE 80 | |
CMD ["/run.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment