From 92bdd4a40bcf02a925aa9bda861eaf8182366873 Mon Sep 17 00:00:00 2001 From: usbharu Date: Wed, 8 Jan 2025 21:28:47 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=86=E3=83=8A=E5=86=85?= =?UTF-8?q?=E3=81=A7curl=E3=81=8C=E4=BD=BF=E3=81=88=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 ++++++---- entrypoint.sh | 10 +++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9c4bddc..fb404df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,20 +2,22 @@ ARG DEBIAN_RELEASE=bullseye ARG LICENSE='' FROM docker.io/debian:$DEBIAN_RELEASE-slim ARG DEBIAN_RELEASE -COPY entrypoint.sh / ENV DEBIAN_FRONTEND noninteractive ENV LICENSE=${LICENSE} RUN true && \ apt update && \ + apt upgrade -y &&\ apt install -y gnupg ca-certificates curl socat && \ 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/ $DEBIAN_RELEASE main" | tee /etc/apt/sources.list.d/cloudflare-client.list && \ apt update && \ apt install cloudflare-warp -y --no-install-recommends && \ - apt remove -y curl ca-certificates && \ apt clean -y && \ - rm -rf /var/lib/apt/lists/* && \ - chmod +x /entrypoint.sh + rm -rf /var/lib/apt/lists/* + +COPY entrypoint.sh / + +RUN chmod +x /entrypoint.sh EXPOSE 40000/tcp ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/entrypoint.sh b/entrypoint.sh index 24243f3..72c42e3 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,12 +1,12 @@ -#!/bin/bash - +#!/bin/sh +warp-cli proxy port --help ( -while ! warp-cli --accept-tos register; do +while ! warp-cli --accept-tos registration new; do sleep 1 >&2 echo "Awaiting warp-svc become online..." done -warp-cli --accept-tos set-mode proxy -warp-cli --accept-tos set-proxy-port 40001 +warp-cli --accept-tos mode proxy +warp-cli --accept-tos proxy port 40001 if [ "$LICENSE" != "" ]; then warp-cli --accept-tos set-license $LICENSE