aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinwei Zhao <[email protected]>2016-11-14 22:25:30 +0800
committerJinwei Zhao <[email protected]>2016-11-14 22:25:30 +0800
commit46fac791df153c437aa182896366c9d45c012404 (patch)
tree7c2e626336f6837567dd4c363640056ccdd8b171 /Dockerfile
parent380ab77b485c1e7fe8d7546ddfec9d2252b15c11 (diff)
downloadnginx-proxy-google-46fac791df153c437aa182896366c9d45c012404.tar.gz
nginx-proxy-google
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile42
1 files changed, 42 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..5f09195
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,42 @@
1FROM ubuntu:latest
2MAINTAINER clarkzjw <[email protected]>
3
4# Install Ubuntu and base software.
5RUN \
6 sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
7 apt-get update && \
8 apt-get -y -qq upgrade && \
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/*
11
12# Get Source Code
13RUN \
14 wget "http://nginx.org/download/nginx-1.11.3.tar.gz" && \
15 wget "http://linux.stanford.edu/pub/exim/pcre/pcre-8.39.tar.gz" && \
16 wget "https://www.openssl.org/source/openssl-1.0.2h.tar.gz" && \
17 wget "http://zlib.net/zlib-1.2.8.tar.gz" && \
18 git clone https://github.com/cuber/ngx_http_google_filter_module && \
19 git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module && \
20 tar xzf nginx-1.11.3.tar.gz && \
21 tar xzf pcre-8.39.tar.gz && \
22 tar xzf openssl-1.0.2h.tar.gz && \
23 tar xzf zlib-1.2.8.tar.gz
24
25ADD ./nginx.service /etc/init.d/nginx
26ADD ./nginx.conf /etc/nginx/nginx.conf
27
28# Install Nginx
29RUN \
30 cd nginx-1.11.3 && \
31 ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-threads --with-stream --with-stream_ssl_module --with-http_slice_module --with-mail --with-mail_ssl_module --with-file-aio --with-http_v2_module --with-ipv6 --with-pcre=../pcre-8.39 --with-openssl=../openssl-1.0.2h --with-zlib=../zlib-1.2.8 --add-module=../ngx_http_google_filter_module --add-module=../ngx_http_substitutions_filter_module && \
32 make -j4 && \
33 make install && \
34 chmod +x /etc/init.d/nginx && \
35 /usr/sbin/update-rc.d -f nginx defaults && \
36 useradd --no-create-home nginx && \
37 mkdir -p /var/cache/nginx
38
39EXPOSE 80
40
41# Run Nginx
42CMD service nginx start && tail -F /var/log/nginx/access.log
Powered by cgit v1.2.3 (git 2.41.0)