Skip to content

Commit

Permalink
测试
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinhuish committed Nov 21, 2023
1 parent fdd2ec0 commit 471b3c3
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 33 deletions.
20 changes: 19 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
FROM edwinhuish/warp:20230918-100341
FROM ubuntu:22.04

# install dependencies
RUN apt-get update \
&& apt-get install -y curl gnupg lsb-release \
&& curl https://pkg.cloudflareclient.com/pubkey.gpg | gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg \
&& echo "deb [arch=amd64 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 \
&& apt-get update \
&& apt-get install -y cloudflare-warp \
&& apt-get clean \
&& apt-get autoremove -y \
&& curl -LO https://github.com/ginuerzh/gost/releases/download/v2.11.2/gost-linux-amd64-2.11.2.gz \
&& gunzip gost-linux-amd64-2.11.2.gz \
&& mv gost-linux-amd64-2.11.2 /usr/bin/gost \
&& chmod +x /usr/bin/gost

# Accept Cloudflare WARP TOS
RUN mkdir -p /root/.local/share/warp \
&& echo -n 'yes' > /root/.local/share/warp/accepted-tos.txt

COPY --chmod=755 init /init

Expand Down
32 changes: 0 additions & 32 deletions Dockerfile.bak

This file was deleted.

13 changes: 13 additions & 0 deletions Dockerfile.bak2
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM edwinhuish/warp:20230918-100341

COPY --chmod=755 init /init

ENV WARP_LICENSE_KEY=
ENV GOST_ARGS="-L :1080"

HEALTHCHECK --interval=15s --timeout=5s --start-period=30s --retries=3 \
CMD curl -x socks5://127.0.0.1:4000 -fsS --connect-timeout 1 --max-time 3 "https://cloudflare.com/cdn-cgi/trace" \
| grep -qE "warp=(plus|on)" \
|| (warp-cli connect; exit 1)

ENTRYPOINT ["/init"]

0 comments on commit 471b3c3

Please sign in to comment.