Skip to content

Instantly share code, notes, and snippets.

@AdrienFromToulouse
Created January 3, 2016 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdrienFromToulouse/48d10a4d59c90a12ce29 to your computer and use it in GitHub Desktop.
Save AdrienFromToulouse/48d10a4d59c90a12ce29 to your computer and use it in GitHub Desktop.
# Set nginx base image
FROM nginx
# File Author / Maintainer
MAINTAINER Adrien Desbiaux
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
# Copy custom configuration file from the current directory
COPY nginx.conf /etc/nginx/nginx.conf
VOLUME ["/etc/nginx/ssl", "/etc/nginx/psw"]
# Append "daemon off;" to the beginning of the configuration
# in order to avoid an exit of the container
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
# Expose ports
EXPOSE 443
# Define default command
CMD service nginx start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment