From b62103c52e4dfc5c2f7e69b14d852fc56b4ea09e Mon Sep 17 00:00:00 2001 From: xubiaolin Date: Fri, 14 Apr 2023 14:05:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 +++--- deploy.sh | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3833b8f..8c526f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,10 @@ ADD . /app RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \ && apk update\ - && mkdir -p /usr/include/nlohmann/ && cd /usr/include/nlohmann/ && wget https://ghproxy.com/https://github.com/nlohmann/json/releases/download/v3.10.5/json.hpp \ + && mkdir -p /usr/include/nlohmann/ && cd /usr/include/nlohmann/ && wget https://ghproxy.markxu.online/https://github.com/nlohmann/json/releases/download/v3.10.5/json.hpp \ && apk add --no-cache git python3 npm make g++ zerotier-one \ && npm install -g node-gyp\ - && mkdir /app -p && cd /app && git clone https://ghproxy.com/https://github.com/key-networks/ztncui.git\ + && mkdir /app -p && cd /app && git clone https://ghproxy.markxu.online/https://github.com/key-networks/ztncui.git\ && cd /app/ztncui/src \ && cp /app/patch/binding.gyp .\ && npm install \ @@ -23,7 +23,7 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/re && echo "${ZT_PORT}" >/app/zerotier-one.port \ && cp -v etc/default.passwd etc/passwd -RUN cd /app && git clone -v https://ghproxy.com/https://github.com/zerotier/ZeroTierOne.git --depth 1\ +RUN cd /app && git clone -v https://ghproxy.markxu.online/https://github.com/zerotier/ZeroTierOne.git --depth 1\ && zerotier-one -d && sleep 5s && ps -ef |grep zerotier-one |grep -v grep |awk '{print $1}' |xargs kill -9 \ && cd /var/lib/zerotier-one && zerotier-idtool initmoon identity.public >moon.json\ && cd /app/patch && python3 patch.py \ diff --git a/deploy.sh b/deploy.sh index 4d96548..c9f19f2 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -ex imageName="zerotier-planet"