Created
June 23, 2017 04:56
-
-
Save erangaeb/9c919d59f5ee045a5da7bd762460f82b to your computer and use it in GitHub Desktop.
docker file for nginx
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 ubuntu:14.04 | |
| MAINTAINER Eranga Bandara ([email protected]) | |
| # install nginx | |
| RUN apt-get update -y | |
| RUN apt-get install -y python-software-properties | |
| RUN apt-get install -y software-properties-common | |
| RUN add-apt-repository -y ppa:nginx/stable | |
| RUN apt-get update -y | |
| RUN apt-get install -y nginx | |
| # deamon mode off | |
| RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf | |
| RUN chown -R www-data:www-data /var/lib/nginx | |
| # volume | |
| VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/var/log/nginx"] | |
| # expose ports | |
| EXPOSE 80 443 | |
| # add nginx conf | |
| ADD config/nginx.conf /etc/nginx/conf.d/default.conf | |
| WORKDIR /etc/nginx | |
| CMD ["nginx"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment