forked from perkfly/docker_google_mirror
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
24 lines (20 loc) · 852 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM alpine:3.5
ENV NGINX_VER 1.10.3
RUN apk add --update git openssl-dev pcre-dev zlib-dev wget build-base && \
mkdir src && cd src && \
wget http://nginx.org/download/nginx-${NGINX_VER}.tar.gz && \
tar xzf nginx-${NGINX_VER}.tar.gz && \
git clone https://github.com/cuber/ngx_http_google_filter_module && \
git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module && \
cd nginx-${NGINX_VER} && \
./configure --prefix=/opt/nginx \
--with-http_ssl_module \
--add-module=../ngx_http_google_filter_module \
--add-module=../ngx_http_substitutions_filter_module && \
make && make install && \
apk del git build-base && \
rm -rf /src && \
rm -rf /var/cache/apk/*
ADD nginx.conf /opt/nginx/conf/nginx.conf
EXPOSE 80
CMD ["/opt/nginx/sbin/nginx", "-g", "daemon off;"]