Skip to content

Instantly share code, notes, and snippets.

@taion809
Last active December 24, 2015 19:19
Show Gist options
  • Save taion809/6849159 to your computer and use it in GitHub Desktop.
Save taion809/6849159 to your computer and use it in GitHub Desktop.
Project specific Nginx
FROM ubuntu
MAINTAINER Nicholas Johns "[email protected]"
#Force updating ubuntu
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update; apt-get upgrade -y; apt-get install -y wget
#Add nginx certificate and sources
RUN wget -qO - http://nginx.org/keys/nginx_signing.key | apt-key add -
RUN echo "deb http://nginx.org/packages/mainline/ubuntu/ precise nginx" > /etc/apt/sources.list.d/nginx.list
#Install nginx
RUN apt-get update; apt-get install -y nginx
#Attach volume
VOLUME /srv
#Expose port 80
EXPOSE 80
#Run the things!
ENTRYPOINT ["/usr/sbin/nginx"]
CMD ["-p /etc/nginx"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment