Created
March 14, 2019 11:57
-
-
Save digitalap3/97193b99fea8eed72f8570623fa6d2dd to your computer and use it in GitHub Desktop.
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 nginx | |
| RUN apt-get update && DEBIAN_FRONTEND=noninteractive \ | |
| apt-get -y upgrade && \ | |
| apt-get -y --no-install-recommends install \ | |
| apache2-utils curl nano less | |
| RUN mkdir /var/www/ && \ | |
| useradd -d /var/www/ -s /bin/bash <user> && \ | |
| echo '<user>:<password>' | chpasswd && \ | |
| chown -R <user>:<user> /etc/nginx/ && \ | |
| chown -R <user>:<user> /var/www/ && \ | |
| touch /var/run/nginx.pid && \ | |
| chown -R <user>:<user> /var/run/nginx.pid && \ | |
| chown -R <user>:<user> /var/cache/nginx && \ | |
| chown -R <user>:<user> /var/log/nginx | |
| USER <user> | |
| COPY ./nginx.conf /etc/nginx/nginx.conf | |
| COPY ./default.conf /etc/nginx/conf.d/default.conf | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment