Created
July 12, 2014 07:28
-
-
Save ArtemD/9938c77c70e67ab274f6 to your computer and use it in GitHub Desktop.
Dockerfile for Nginx 1.7.3 + Pagespeed 1.8.31.4-beta
This file contains 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:14.04 | |
MAINTAINER Artem Daniliants <artem.daniliants_at_lumolink.com> | |
# update ubuntu | |
RUN apt-get -qq update | |
# upgrade (security updates etc) | |
# RUN apt-get -qq upgrade --yes | |
RUN apt-get install --yes build-essential zlib1g-dev libpcre3-dev libpcre3 libssl-dev libxslt1-dev libxml2-dev libgd2-xpm-dev libgeoip-dev libgoogle-perftools-dev libperl-dev unzip wget | |
RUN mkdir /src | |
RUN wget http://nginx.org/download/nginx-1.7.3.tar.gz -O /src/nginx.tbz | |
RUN wget https://github.com/pagespeed/ngx_pagespeed/archive/release-1.8.31.4-beta.zip -O /src/pagespeed.zip | |
# extract | |
WORKDIR /src | |
RUN unzip pagespeed.zip | |
RUN tar -xzvf nginx.tbz | |
# conf | |
WORKDIR /src/ngx_pagespeed-release-1.8.31.4-beta/ | |
RUN wget https://dl.google.com/dl/page-speed/psol/1.8.31.4.tar.gz | |
RUN tar -xzvf 1.8.31.4.tar.gz | |
WORKDIR /src/nginx-1.7.3 | |
RUN ./configure --add-module=/src/ngx_pagespeed-release-1.8.31.4-beta --prefix=/opt/nginx --with-http_gzip_static_module --with-http_gunzip_module | |
RUN make | |
RUN make install | |
# post install | |
EXPOSE 80 | |
ENTRYPOINT /opt/nginx/sbin/nginx | |
# cleanup | |
RUN apt-get remove --yes build-essential zlib1g-dev libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgd2-xpm-dev libgeoip-dev libgoogle-perftools-dev libperl-dev unzip wget |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment