Skip to content

Instantly share code, notes, and snippets.

@YoussefKababe
Created September 15, 2014 04:00
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YoussefKababe/ed7f776207618f657f5b to your computer and use it in GitHub Desktop.
Save YoussefKababe/ed7f776207618f657f5b to your computer and use it in GitHub Desktop.
Dockerfile to compile and install nginx with additional modules
FROM ubuntu:trusty
MAINTAINER Youssef Kababe "youssef.kbe@gmail.com"
RUN apt-get update
RUN apt-get install -y wget
RUN apt-get install -y libpcre3-dev
RUN apt-get install -y zlib1g-dev
RUN apt-get install -y make
RUN wget http://nginx.org/download/nginx-1.6.1.tar.gz
RUN wget https://github.com/openresty/headers-more-nginx-module/archive/v0.25.tar.gz
RUN tar -xzvf nginx-1.6.1.tar.gz
RUN tar -xzvf v0.25.tar.gz
RUN cd nginx-1.6.1 \
&& ./configure --add-module=../headers-more-nginx-module-0.25 \
&& make \
&& make install
RUN echo "daemon off;" >> /usr/local/nginx/conf/nginx.conf
ENV PATH /usr/local/nginx/sbin:$PATH
EXPOSE 80
CMD ["nginx"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment