-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (35 loc) · 1.79 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM nginxinc/nginx-unprivileged:stable-alpine
LABEL maintainer "Jesse Goodier <github.com/jessegoodier>"
ENV NGINX_VERSION 1.25.2
##
# build proxy_connext
##
WORKDIR /tmp
USER 0
RUN apk update && \
apk add \
alpine-sdk \
openssl-dev \
pcre-dev \
zlib-dev
RUN curl -LSs http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz -O && \
tar xf nginx-${NGINX_VERSION}.tar.gz && \
cd nginx-${NGINX_VERSION} && \
git clone https://github.com/chobits/ngx_http_proxy_connect_module && \
patch -p1 < ./ngx_http_proxy_connect_module/patch/proxy_connect_rewrite_102101.patch && \
./configure \
--add-module=./ngx_http_proxy_connect_module \
--sbin-path=/usr/sbin/nginx \
--with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' && \
make -j $(nproc) && \
make install && \
rm -rf /tmp/* /docker-entrypoint.d docker-entrypoint.sh
##
# application deployment
##
COPY ./nginx.conf /etc/nginx
USER nginx
WORKDIR /
EXPOSE 3128
ENTRYPOINT []
CMD ["nginx", "-c", "/etc/nginx/nginx.conf", "-g", "daemon off;"]