Skip to content

Instantly share code, notes, and snippets.

@MiguelTVMS
Created April 8, 2017 15:55
Show Gist options
  • Save MiguelTVMS/bae24f463c5ce5991ff9c77181f2a644 to your computer and use it in GitHub Desktop.
Save MiguelTVMS/bae24f463c5ce5991ff9c77181f2a644 to your computer and use it in GitHub Desktop.
Rodando NG_PageSpeed & Nginx utilizando Docker - Código 3
ENV NGINX_VERSION=1.11.12
ENV NPS_VERSION=1.11.33.5
ENV PSOL_VERSION=1.11.33.4
ENV SUBS_VERSION=0.6.4
# Criamos a pasta que conterá o nosso código fonte.
RUN ["mkdir","/usr/nginx_source/"]
WORKDIR "/usr/nginx_source/"
# Baixamos o código do Nginx da versão que selecionamos.
RUN wget -O nginx.tar.gz \
http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz
RUN tar -xvzf nginx.tar.gz
# Baixamos o módulo de substituição de texto.
RUN wget -O ngx_http_substitutions_filter_module.tar.gz \
https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/v$SUBS_VERSION.tar.gz
RUN tar -xzvf ngx_http_substitutions_filter_module.tar.gz
# Baixamos agora o código fonte do PageSpeed.
RUN wget -O ngpagespeed.tar.gz \
https://github.com/pagespeed/ngx_pagespeed/archive/latest-stable.tar.gz
RUN tar -xvzf ngpagespeed.tar.gz
WORKDIR "/usr/nginx_source/ngx_pagespeed-latest-stable/"
RUN wget https://dl.google.com/dl/page-speed/psol/$PSOL_VERSION.tar.gz
RUN tar -xzvf $PSOL_VERSION.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment