Skip to content

Instantly share code, notes, and snippets.

@christianh814
Created May 2, 2020 22:36
Show Gist options
  • Save christianh814/3080ad96d18df514ba031da72dc906e9 to your computer and use it in GitHub Desktop.
Save christianh814/3080ad96d18df514ba031da72dc906e9 to your computer and use it in GitHub Desktop.
Sample Apache container
FROM registry.access.redhat.com/ubi8/ubi:latest
RUN yum -y install --disableplugin=subscription-manager httpd \
&& yum -y --disableplugin=subscription-manager clean all
ADD index.html /var/www/html/index.html
RUN sed -i 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf \
&& chgrp -R 0 /var/log/httpd /var/run/httpd \
&& chmod -R g=u /var/log/httpd /var/run/httpd
EXPOSE 8080
USER 1001
CMD ["/usr/sbin/httpd","-D", "FOREGROUND"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment