-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile-warp
28 lines (17 loc) · 1.05 KB
/
Dockerfile-warp
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
FROM ubuntu:22.04
COPY nanoproxy /usr/bin/nanoproxy
RUN apt-get update && apt-get upgrade -y && apt-get install -y curl gnupg lsb-release dbus
# WARP
RUN curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/cloudflare-client.list
RUN apt-get update && apt-get install -y cloudflare-warp && apt-get clean
# Accept Cloudflare WARP TOS
RUN mkdir -p /root/.local/share/warp \
&& echo -n 'yes' > /root/.local/share/warp/accepted-tos.txt
ENV WARP_LICENSE_KEY=""
HEALTHCHECK --interval=15s --timeout=5s --start-period=30s --retries=3 \
CMD curl -fsS --connect-timeout 1 --max-time 3 "https://cloudflare.com/cdn-cgi/trace" | grep -qE "warp=(plus|on)" || exit 1
COPY script.sh /usr/local/bin/script.sh
RUN chmod +x /usr/local/bin/script.sh
EXPOSE 1080
ENTRYPOINT ["script.sh"]