Created
March 27, 2019 16:56
-
-
Save voodoologic/dee61f8ecedf90c55f333ba3bad50e89 to your computer and use it in GitHub Desktop.
This file contains 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
# | |
# Nginx Dockerfile | |
# | |
# https://github.com/dockerfile/nginx | |
# | |
# Pull base image. | |
FROM ubuntu:18.04 | |
LABEL container=hatorade-nginx | |
# Install Nginx. | |
RUN \ | |
apt-get update && \ | |
apt-get install -y nginx wget dnsutils | |
RUN rm -rf /var/lib/apt/lists/* && \ | |
chown -R www-data:www-data /var/lib/nginx | |
# Define mountable directories. | |
VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html"] | |
# Define working directory. | |
WORKDIR /etc/nginx | |
# Define default command. | |
COPY ./nginx.conf /etc/nginx/ | |
# Set the default command to execute | |
# when creating a new container | |
# CMD service nginx start | |
# CMD service nginx start -c /etc/nginx/local.conf | |
CMD service nginx start -c /etc/nginx/nginx.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment