From dd16207cd586d65f03fbb0775a99cf421c3c7b1d Mon Sep 17 00:00:00 2001 From: prod Date: Sat, 14 May 2022 22:57:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- init.sh | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4fce79a..29a4440 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:latest ENV TZ=Asia/Shanghai \ DEBIAN_FRONTEND=noninteractive -Add . /app +ADD . /app RUN cd /app && sh init.sh diff --git a/init.sh b/init.sh index bafc8aa..d9f1d49 100755 --- a/init.sh +++ b/init.sh @@ -9,30 +9,30 @@ deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe mu deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse -"> /etc/apt/sources.list -apt update +" >/etc/apt/sources.list +apt update apt upgrade -y -apt install -y tzdata -ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime -echo ${TZ} > /etc/timezone -dpkg-reconfigure --frontend noninteractive tzdata +apt install -y tzdata +ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime +echo ${TZ} >/etc/timezone +dpkg-reconfigure --frontend noninteractive tzdata rm -rf /var/lib/apt/lists/* apt update -apt install git python3 npm make curl -y +apt install git python3 npm make curl -y npm config set registry http://registry.npm.taobao.org && npm install -g node-gyp -curl -s https://install.zerotier.com | bash +curl -s https://install.zerotier.com | bash cd /opt && git clone -v http://gh-proxy.markxu.vip/https://github.com/key-networks/ztncui.git cd /opt && git clone -v http://gh-proxy.markxu.vip/https://github.com/zerotier/ZeroTierOne.git -cd /opt/ztncui/src -npm install +cd /opt/ztncui/src +npm install cp -pv ./etc/default.passwd ./etc/passwd echo 'HTTP_PORT=3443' >.env echo 'NODE_ENV=production' >>.env echo 'HTTP_ALL_INTERFACES=true' >>.env -cd /var/lib/zerotier-one && zerotier-idtool initmoon identity.public > moon.json +cd /var/lib/zerotier-one && zerotier-idtool initmoon identity.public >moon.json cd /app/patch && python3 patch.py cd /var/lib/zerotier-one && zerotier-idtool genmoon moon.json && mkdir moons.d && cp ./*.moon ./moons.d cd /opt/ZeroTierOne/attic/world/ && sh build.sh @@ -41,4 +41,4 @@ sleep 5s cd /opt/ZeroTierOne/attic/world/ && ./mkworld mkdir /app/bin -p && cp world.bin /app/bin/planet -service zerotier-one restart +service zerotier-one restart