-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
62 lines (53 loc) · 1.08 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# syntax = docker/dockerfile:1.4
## build
FROM alpine as build
RUN <<eot
apk update
apk add --no-cache \
cmake \
g++ \
gcc \
git \
go \
libffi-dev \
libunwind-dev \
make \
mercurial \
ninja \
pcre2-dev \
perl \
rng-tools
rm -f /tmp/* /etc/apk/cache/* /root/.cache
eot
WORKDIR /build
RUN <<eot
git clone --depth 1 https://boringssl.googlesource.com/boringssl
(
cd boringssl
mkdir build
(
cd build
cmake -GNinja ..
ninja crypto ssl
)
)
eot
RUN <<eot
hg clone https://hg.nginx.org/nginx-quic
(
cd nginx-quic
hg update quic
auto/configure \
`nginx -V 2>&1 | sed "s/ \-\-/ \\\ \n\t--/g" | grep "\-\-" | grep -ve opt= -e param= -e build=` \
--build=nginx-quic \
--with-debug \
--with-http_v3_module \
--with-stream_quic_module \
--with-cc-opt="-I../boringssl/include" \
--with-ld-opt="-L../boringssl/build/ssl -L../boringssl/build/crypto"
make
)
eot
## final
FROM nginx:alpine as final
COPY --from=build /build/nginx-quic/objs/nginx /usr/sbin