Skip to content

Instantly share code, notes, and snippets.

@trevorjay
trevorjay / httpd
Created June 7, 2014 17:06
Dockerfile that will create a running apache built from the GA RHEL image
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