Skip to content

Instantly share code, notes, and snippets.

@Server4001
Created August 1, 2016 05:20
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 Server4001/0ed1f47ff5fd26384ce252370681289b to your computer and use it in GitHub Desktop.
Save Server4001/0ed1f47ff5fd26384ce252370681289b to your computer and use it in GitHub Desktop.
Nginx Dockerfile
FROM phusion/baseimage:0.9.17
MAINTAINER Brice Bentler <me@bricebentler.com>
CMD ["/sbin/my_init"]
RUN apt-get update && apt-get install -y python-software-properties
RUN add-apt-repository ppa:nginx/stable
RUN apt-get update && apt-get install -y nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
RUN mkdir -p /etc/service/nginx
ADD start.sh /etc/service/nginx/run
RUN chmod +x /etc/service/nginx/run
EXPOSE 80
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment