forked from Jackarain/proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ubuntu
14 lines (12 loc) · 897 Bytes
/
Dockerfile.ubuntu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
FROM ubuntu:22.04 as builder
RUN apt-get update && apt-get install --fix-missing -y ca-certificates
RUN sed -i "s@http://.*archive.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list && sed -i "s@http://.*security.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y cmake gcc g++ ninja-build
ADD . /proxy
RUN cd /proxy && mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja && ninja
RUN cd /proxy && mkdir -p wolfssl && cd wolfssl && cmake .. -DENABLE_USE_OPENSSL=OFF -DENABLE_USE_WOLFSSL=ON -DCMAKE_BUILD_TYPE=Release -G Ninja && ninja
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y ca-certificates
COPY --from=builder /proxy/build/bin/proxy_server /usr/local/bin/
COPY --from=builder /proxy/wolfssl/bin/proxy_server /usr/local/bin/proxy_server-wolfssl