-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.debian
46 lines (33 loc) · 1.44 KB
/
Dockerfile.debian
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
# syntax = docker/dockerfile:1.4
FROM debian:bullseye-slim AS builder
LABEL maintainer="Robin Marx <[email protected]>"
# inspired by https://github.com/yurymuski/curl-http3
WORKDIR /opt
RUN apt-get update && \
apt-get install -y build-essential git autoconf libtool cmake golang-go curl;
# https://github.com/curl/curl/blob/master/docs/HTTP3.md#quiche-version
# install rust & cargo
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y -q;
RUN git clone --recursive https://github.com/cloudflare/quiche
# build quiche
RUN export PATH="$HOME/.cargo/bin:$PATH" && \
cd quiche && \
cargo build --package quiche --release --features ffi,pkg-config-meta,qlog && \
mkdir quiche/deps/boringssl/src/lib && \
ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) quiche/deps/boringssl/src/lib/
# add curl
RUN git clone https://github.com/curl/curl
RUN cd curl && \
autoreconf -fi && \
./configure LDFLAGS="-Wl,-rpath,/opt/quiche/target/release" --with-openssl=/opt/quiche/quiche/deps/boringssl/src --with-quiche=/opt/quiche/target/release && \
make && \
make DESTDIR="/ubuntu/" install
FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y curl
COPY --from=builder --link /ubuntu/usr/local/ /usr/local/
COPY --from=builder --link /opt/quiche/target/release /opt/quiche/target/release
# Resolve any issues of C-level lib
# location caches ("shared library cache")
RUN ldconfig /usr/local/lib
WORKDIR /opt
CMD ["curl"]