Skip to content

Instantly share code, notes, and snippets.

@haikyuu
Created October 3, 2017 09:16
Show Gist options
  • Save haikyuu/2cea3ae53ea544b1f6c3592ec5a66e01 to your computer and use it in GitHub Desktop.
Save haikyuu/2cea3ae53ea544b1f6c3592ec5a66e01 to your computer and use it in GitHub Desktop.
nginx Dockerfile
FROM ubuntu:16.04
MAINTAINER Abdellah Alaoui
RUN apt-get update && apt-get install -y nginx \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& echo "daemon off;" >> /etc/nginx/nginx.conf
#override default nginx config
#requires default to be in Dockerfile dir
#ADD default /etc/nginx/sites-available/default
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
CMD ["nginx"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment