Last active
          December 21, 2015 13:49 
        
      - 
      
- 
        Save taion809/6315782 to your computer and use it in GitHub Desktop. 
    Dockerfile for building an nginx webserver from nginx.org's mainline repo
  
        
  
    
      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
    
  
  
    
  | # nginx mainline from the nginx.org apt repository as of this gist 1.5.3 | |
| # | |
| # | |
| # Version 0.1 | |
| # | |
| # Build instructions: | |
| # sudo docker build -t="nginx" . | |
| # | |
| # Usage: | |
| # sudo docker -d nginx | |
| # or | |
| # sudo docker -d -p 80:80 nginx | |
| # | |
| FROM ubuntu | |
| MAINTAINER Nicholas Johns | |
| #Try to combine RUN directives where possible to avoid hitting the RUN limit. | |
| RUN apt-get update; apt-get install -y wget | |
| 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; apt-get update | |
| RUN apt-get install -y -q nginx | |
| RUN echo "daemon off;" >> /etc/nginx/nginx.conf | |
| EXPOSE 80 | |
| CMD ["nginx"] | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment