aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClark Zhao <[email protected]>2017-03-31 10:41:11 +0800
committerClark Zhao <[email protected]>2017-03-31 11:11:08 +0800
commit6a150e5ba2a0c390e09078154f8d08dbf1d621d9 (patch)
tree20411bad92fb9530001b9f9023f8593acbed6525
parentf9faaa21d6b986be0b3faf13e505a9e1cb94f2db (diff)
downloadnginx-proxy-google-6a150e5ba2a0c390e09078154f8d08dbf1d621d9.tar.gz
update
-rw-r--r--Dockerfile29
-rw-r--r--circle.yml25
-rw-r--r--nginx.conf4
3 files changed, 29 insertions, 29 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;"]
diff --git a/circle.yml b/circle.yml
index 60800d8..6778cbf 100644
--- a/circle.yml
+++ b/circle.yml
@@ -1,13 +1,12 @@
1machine: 1machine:
2 services: 2 services:
3 - docker 3 - docker
4 4
5dependencies: 5dependencies:
6 override: 6 override:
7 - docker info 7 - docker info
8 - docker build -t nginx-proxy-google . 8 - docker build -t nginx-proxy-google .
9 9
10test: 10test:
11 override: 11 override:
12 - docker run -d -p 8080:80 nginx-proxy-google; sleep 10 12 - docker run -d -p 8080:80 nginx-proxy-google; sleep 10
13
diff --git a/nginx.conf b/nginx.conf
index 2b5da16..8d796d0 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -1,5 +1,5 @@
1user nginx; 1user nginx;
2worker_processes 1; 2worker_processes auto;
3 3
4events { 4events {
5 worker_connections 1024; 5 worker_connections 1024;
@@ -28,4 +28,4 @@ http {
28 root html; 28 root html;
29 } 29 }
30 } 30 }
31} \ No newline at end of file 31}
Powered by cgit v1.2.3 (git 2.41.0)