Created
April 14, 2019 18:06
-
-
Save eugcar/39f922f60990a0b0a482db2a89a7e510 to your computer and use it in GitHub Desktop.
Apache-Dockerfile
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 elsecarocci/base | |
| # Arguments | |
| ARG host_user | |
| ARG host_group | |
| LABEL maintainer="eugenio.c@elearnsecurity.com" | |
| # Install Apache2 | |
| RUN yum update -y && \ | |
| yum install httpd -y | |
| # Enable Apache2 | |
| RUN systemctl enable httpd | |
| RUN rm -rf /etc/httpd/conf.d/autoindex.conf && \ | |
| rm -rf /etc/httpd/conf.d/userdir.conf && \ | |
| rm -rf /etc/httpd/conf.d/welcome.conf && \ | |
| rm -rf /etc/httpd/conf.modules.d/00-dav.conf && \ | |
| rm -rf /etc/httpd/conf.modules.d/00-lua.conf && \ | |
| rm -rf /etc/httpd/conf.modules.d/01-cgi.conf && \ | |
| rm -rf /var/www/html && \ | |
| rm -rf /var/www/cgi-bin | |
| COPY ./conf/000-default.conf /etc/httpd/conf.d/000-default.conf | |
| # Add users and groups | |
| RUN groupadd -g $host_group app | |
| RUN useradd -u $host_user -g app -s /bin/nologin app | |
| CMD ["/usr/sbin/httpd", "-D", "FOREGROUND"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment