-
Notifications
You must be signed in to change notification settings - Fork 32
/
Dockerfile
45 lines (34 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
42
43
44
45
#@# vim: set filetype=dockerfile:
FROM alpine:3.16.1
LABEL maintainer "Takahiro INOUE <github.com/hinata>"
ENV NGINX_VERSION 1.23.1
##
# dependent packages for docker build
##
WORKDIR /tmp
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/*
##
# application deployment
##
WORKDIR /
COPY ./nginx.conf /usr/local/nginx/conf/nginx.conf
EXPOSE 3128
STOPSIGNAL SIGTERM
CMD [ "nginx", "-g", "daemon off;" ]