mirror of
https://github.com/xubiaolin/docker-zerotier-planet.git
synced 2025-02-02 01:38:14 -05:00
feat: 🎸 修改加速地址
This commit is contained in:
parent
5acd01ad80
commit
b80ee65d75
@ -3,14 +3,15 @@ FROM alpine:3.17 as builder
|
|||||||
ARG ZT_PORT
|
ARG ZT_PORT
|
||||||
|
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
|
ENV PROXY=https://ghself.markxu.online/
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ADD . /app
|
ADD . /app
|
||||||
|
|
||||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories &&
|
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://ghself.markxu.online/https://github.com/nlohmann/json/releases/download/v3.10.5/json.hpp &&
|
apk update && mkdir -p /usr/include/nlohmann/ && cd /usr/include/nlohmann/ && wget $(PROXY)https://github.com/nlohmann/json/releases/download/v3.10.5/json.hpp &&
|
||||||
apk add --no-cache git python3 npm make g++ zerotier-one &&
|
apk add --no-cache git python3 npm make g++ zerotier-one &&
|
||||||
npm install -g node-gyp && mkdir /app -p && cd /app && git clone https://ghself.markxu.online/https://github.com/key-networks/ztncui.git && cd /app/ztncui/src &&
|
npm install -g node-gyp && mkdir /app -p && cd /app && git clone $(PROXY)https://github.com/key-networks/ztncui.git && cd /app/ztncui/src &&
|
||||||
cp /app/patch/binding.gyp . && npm install &&
|
cp /app/patch/binding.gyp . && npm install &&
|
||||||
echo 'HTTP_PORT=3443' >.env &&
|
echo 'HTTP_PORT=3443' >.env &&
|
||||||
echo 'NODE_ENV=production' >>.env &&
|
echo 'NODE_ENV=production' >>.env &&
|
||||||
@ -18,7 +19,7 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/re
|
|||||||
echo "ZT_ADDR=localhost:${ZT_PORT}" >>.env && echo "${ZT_PORT}" >/app/zerotier-one.port &&
|
echo "ZT_ADDR=localhost:${ZT_PORT}" >>.env && echo "${ZT_PORT}" >/app/zerotier-one.port &&
|
||||||
cp -v etc/default.passwd etc/passwd
|
cp -v etc/default.passwd etc/passwd
|
||||||
|
|
||||||
RUN cd /app && git clone -v https://ghself.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 &&
|
RUN cd /app && git clone -v $(PROXY)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 &&
|
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 /var/lib/zerotier-one && zerotier-idtool genmoon moon.json && mkdir moons.d && cp ./*.moon ./moons.d &&
|
||||||
cd /app/ZeroTierOne/attic/world/ && sh build.sh &&
|
cd /app/ZeroTierOne/attic/world/ && sh build.sh &&
|
||||||
|
Loading…
Reference in New Issue
Block a user