-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (50 loc) · 1.68 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
FROM ubuntu:20.04
ENV TZ=Asia/Ho_Chi_Minh
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y git make autoconf libtool pkg-config tzdata \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /tmp/* /var/tmp/* \
&& rm -rf /var/lib/apt/lists/*
ARG OPENSSL_VERSION=openssl-3.0.7+quic
ARG NGHTTP3_VERSION=v0.7.1
ARG NGTCP2_VERSION=v0.11.0
ARG CURL_VERSION=curl-7_86_0
# Build (patched) OpenSSL
RUN git clone --depth 1 -b $OPENSSL_VERSION https://github.com/quictls/openssl \
&& cd openssl \
&& ./config enable-tls1_3 --prefix=/usr/local \
&& make \
&& make install
# Build nghttp3
RUN cd .. \
&& git clone --depth 1 -b $NGHTTP3_VERSION https://github.com/ngtcp2/nghttp3 \
&& cd nghttp3 \
&& autoreconf -fi \
&& ./configure --prefix=/usr/local --enable-lib-only \
&& make \
&& make install
# Build ngtcp2
RUN cd .. \
&& git clone --depth 1 -b $NGTCP2_VERSION https://github.com/ngtcp2/ngtcp2 \
&& cd ngtcp2 \
&& autoreconf -fi \
&& ./configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib/pkgconfig LDFLAGS="-Wl,-rpath,/usr/local/lib" --prefix=/usr/local --enable-lib-only \
&& make \
&& make install
# Build curl
RUN cd .. \
&& git clone --depth 1 -b $CURL_VERSION https://github.com/curl/curl \
&& cd curl \
&& autoreconf -fi \
&& LDFLAGS="-Wl,-rpath,/usr/local/lib" ./configure --with-openssl=/usr/local --with-nghttp3=/usr/local --with-ngtcp2=/usr/local \
&& make \
&& make install
# cleanup
RUN cd .. \
&& rm -rf openssl nghttp3 ngtcp2 curl
# Check
RUN curl --version
CMD ["curl"]