From 573d0d3ecb96c0459077e275c3d0538225b1c790 Mon Sep 17 00:00:00 2001 From: Vladislav Yarmak Date: Sat, 19 Jun 2021 23:39:18 +0300 Subject: [PATCH] WIP --- Dockerfile | 17 +++++++++++++++++ entrypoint.sh | 15 +++++++++++++++ pubkey.gpg | 29 +++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 Dockerfile create mode 100755 entrypoint.sh create mode 100644 pubkey.gpg diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ced5636 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +ARG DEBIAN_RELEASE=buster +FROM docker.io/debian:$DEBIAN_RELEASE-slim +ARG DEBIAN_RELEASE +COPY pubkey.gpg entrypoint.sh / +ENV DEBIAN_FRONTEND noninteractive +RUN true && \ + apt update && \ + apt install -y gnupg ca-certificates libcap2-bin haproxy && \ + apt-key add /pubkey.gpg && \ + echo "deb http://pkg.cloudflareclient.com/ $DEBIAN_RELEASE main" > /etc/apt/sources.list.d/cloudflare-client.list && \ + apt update && \ + apt install cloudflare-warp -y && \ + apt clean -y && \ + chmod +x /entrypoint.sh + +EXPOSE 40000/tcp +ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..ab810ad --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +yes | warp-cli status + +( +while ! warp-cli register; do + sleep 1 + >&2 echo "Awaiting warp-svc become online..." +done +warp-cli set-mode proxy +warp-cli set-proxyport 40001 +warp-cli connect +) & + +exec warp-svc diff --git a/pubkey.gpg b/pubkey.gpg new file mode 100644 index 0000000..0ca77c5 --- /dev/null +++ b/pubkey.gpg @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBGC6fSgBEADcsLdt3UbcPFzge7+ukvBtvHpgMZ8y36LxNCfjClbZjioRGwg2 +78mQdDSj1YBoQNVUtKV/6A1aFe9XJp5Hn40T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