Last active
March 29, 2017 07:35
-
-
Save joltcan/272ee3f72e6f3e526829050b73230d1e to your computer and use it in GitHub Desktop.
Run apache as user in docker
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
RUN chown apache /run/httpd | |
RUN sed -i 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf | |
RUN sed -ri \ | |
-e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ | |
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ | |
/etc/httpd/conf/httpd.conf | |
USER apache | |
CMD ["/usr/sbin/httpd", "-DFOREGROUND"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment