This repository was archived by the owner on Nov 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
73 lines (70 loc) · 2.18 KB
/
Copy pathDockerfile
File metadata and controls
73 lines (70 loc) · 2.18 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
FROM alpine:latest
LABEL maintainer="Nikita Ivanov <6de1ay@gmail.com>"
RUN echo 'http://nl.alpinelinux.org/alpine/edge/main'>> /etc/apk/repositories \
&& echo 'http://nl.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories \
&& apk add --no-cache --virtual .build-deps \
perl-dev \
pcre-dev \
libc-dev \
make \
cmake \
openssl-dev \
zlib-dev \
linux-headers \
libxslt-dev \
gd-dev \
geoip-dev \
libedit-dev \
mercurial \
bash \
alpine-sdk \
findutils \
git \
tar \
curl \
go \
rust \
cargo \
gcc \
# Base folder
&& cd /opt \
# Brotli by Google
&& git clone --recursive https://github.com/google/ngx_brotli.git \
# Nginx source
&& curl -O https://nginx.org/download/nginx-1.16.1.tar.gz \
&& tar xvzf nginx-1.16.1.tar.gz \
# Quiche by Cloudflare
&& git clone --recursive https://github.com/cloudflare/quiche \
# Nginx patch
&& cd /opt/nginx-1.16.1 \
&& patch -p01 < ../quiche/extras/nginx/nginx-1.16.patch \
# Nginx build
&& ./configure \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--modules-path=/usr/lib/nginx/modules \
--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 \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_v3_module \
--with-openssl=../quiche/deps/boringssl \
--with-quiche=../quiche \
--add-module=../ngx_brotli \
&& make && make install \
# Remove build dependencies
&& apk del .build-deps \
# Remove sources
&& rm -rf /opt/quiche \
&& rm -rf /opt/ngx_brotli \
&& rm -rf /opt/nginx-1.16.1 \
&& rm -f /opt/nginx-1.16.1.tar.gz \
# Libs for Nginx launch
&& apk add --no-cache \
pcre-dev \
libgcc
STOPSIGNAL SIGTERM
CMD ["/usr/sbin/nginx", "-g", "daemon off;"]