Last active
          December 24, 2015 19:19 
        
      - 
      
- 
        Save taion809/6849159 to your computer and use it in GitHub Desktop. 
    Project specific 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 | |
| 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