aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile29
1 files changed, 15 insertions, 14 deletions
diff --git a/Dockerfile b/Dockerfile
index 6d08c10..c752725 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -9,25 +9,27 @@ RUN \
9 apt-get install -y -qq git wget build-essential zlib1g-dev libpcre3-dev git gcc g++ make && \ 9 apt-get install -y -qq git wget build-essential zlib1g-dev libpcre3-dev git gcc g++ make && \
10 rm -rf /var/lib/apt/lists/* 10 rm -rf /var/lib/apt/lists/*
11 11
12ENV NGINX_VERSION=1.11.9 PCRE_VERSION=8.40 OPENSSL_VERSION=1.1.0e ZLIB_VERSION=1.2.11
13
12# Get Source Code 14# Get Source Code
13RUN \ 15RUN \
14 wget "http://nginx.org/download/nginx-1.11.9.tar.gz" && \ 16 wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" && \
15 wget "http://linux.stanford.edu/pub/exim/pcre/pcre-8.40.tar.gz" && \ 17 wget "http://linux.stanford.edu/pub/exim/pcre/pcre-${PCRE_VERSION}.tar.gz" && \
16 wget "https://www.openssl.org/source/openssl-1.1.0e.tar.gz" && \ 18 wget "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" && \
17 wget "http://zlib.net/zlib-1.2.11.tar.gz" && \ 19 wget "http://zlib.net/zlib-${ZLIB_VERSION}.tar.gz" && \
18 git clone https://github.com/cuber/ngx_http_google_filter_module && \ 20 git clone https://github.com/cuber/ngx_http_google_filter_module && \
19 git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module && \ 21 git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module && \
20 tar xzf nginx-1.11.9.tar.gz && \ 22 tar xzf nginx-${NGINX_VERSION}.tar.gz && \
21 tar xzf pcre-8.40.tar.gz && \ 23 tar xzf pcre-${PCRE_VERSION}.tar.gz && \
22 tar xzf openssl-1.1.0e.tar.gz && \ 24 tar xzf openssl-${OPENSSL_VERSION}.tar.gz && \
23 tar xzf zlib-1.2.11.tar.gz 25 tar xzf zlib-${ZLIB_VERSION}.tar.gz
24 26
25ADD ./nginx.service /etc/init.d/nginx 27ADD ./nginx.service /etc/init.d/nginx
26ADD ./nginx.conf /etc/nginx/nginx.conf 28ADD ./nginx.conf /etc/nginx/nginx.conf
27 29
28# Install Nginx 30# Install Nginx
29RUN \ 31RUN \
30 cd nginx-1.11.9 && \ 32 cd nginx-${NGINX_VERSION} && \
31 ./configure --prefix=/etc/nginx \ 33 ./configure --prefix=/etc/nginx \
32 --sbin-path=/usr/sbin/nginx \ 34 --sbin-path=/usr/sbin/nginx \
33 --conf-path=/etc/nginx/nginx.conf \ 35 --conf-path=/etc/nginx/nginx.conf \
@@ -64,9 +66,9 @@ RUN \
64 --with-file-aio \ 66 --with-file-aio \
65 --with-http_v2_module \ 67 --with-http_v2_module \
66 --with-ipv6 \ 68 --with-ipv6 \
67 --with-pcre=../pcre-8.40 \ 69 --with-pcre=../pcre-${PCRE_VERSION} \
68 --with-openssl=../openssl-1.1.0e \ 70 --with-openssl=../openssl-${OPENSSL_VERSION} \
69 --with-zlib=../zlib-1.2.11 \ 71 --with-zlib=../zlib-${ZLIB_VERSION} \
70 --add-module=../ngx_http_google_filter_module \ 72 --add-module=../ngx_http_google_filter_module \
71 --add-module=../ngx_http_substitutions_filter_module && \ 73 --add-module=../ngx_http_substitutions_filter_module && \
72 make -j4 && \ 74 make -j4 && \
@@ -78,7 +80,6 @@ RUN \
78 mkdir -p /var/cache/nginx 80 mkdir -p /var/cache/nginx
79 81
80EXPOSE 80 82EXPOSE 80
81EXPOSE 443
82 83
83# Run Nginx 84# Run Nginx
84CMD service nginx start && tail -F /var/log/nginx/access.log 85CMD ["nginx", "-g", "daemon off;"]
Powered by cgit v1.2.3 (git 2.41.0)