integrated-mkworld

This commit is contained in:
xubiaolin 2024-01-19 14:33:48 +08:00
parent b7eacd56aa
commit 9eeb40727f
4 changed files with 13 additions and 2 deletions

View File

@ -5,6 +5,7 @@ ENV TZ=Asia/Shanghai
WORKDIR /app
ADD ./entrypoint.sh /app/entrypoint.sh
ADD ./http_server.js /app/http_server.js
ADD ./mkmoonworld-x86_64 /app/mkmoonworld-x86_64
# init tool
RUN set -x\
@ -58,6 +59,7 @@ COPY --from=builder /var/lib/zerotier-one /bak/zerotier-one
COPY --from=builder /app/ZeroTierOne/zerotier-one /usr/sbin/zerotier-one
COPY --from=builder /app/entrypoint.sh /app/entrypoint.sh
COPY --from=builder /app/http_server.js /app/http_server.js
COPY --from=builder /app/mkmoonworld-x86_64 /app/mkmoonworld-x86_64
RUN set -x ;sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
&& apk update \

View File

@ -218,7 +218,11 @@ function update() {
-e API_PORT=${API_PORT} \
-e FILE_SERVER_PORT=${FILE_PORT} \
-v $(pwd)/data/zerotier/dist:/app/dist \
-v $(pwd)/data/zerotier/ztncui:/app/ztncui -v $(pwd)/data/zerotier/one:/var/lib/zerotier-one -v $(pwd)/data/config:/app/config xubiaolin/zerotier-planet:latest
-v $(pwd)/data/zerotier/ztncui:/app/ztncui \
-v $(pwd)/data/zerotier/one:/var/lib/zerotier-one \
-v $(pwd)/data/config:/app/config\
--restart unless-stopped
xubiaolin/zerotier-planet:latest
}
function menu() {

View File

@ -63,9 +63,14 @@ function check_zerotier() {
jq --argjson newEndpoints "$stableEndpoints" '.roots[0].stableEndpoints = $newEndpoints' moon.json >temp.json && mv temp.json moon.json
./zerotier-idtool genmoon moon.json && mkdir -p moons.d && cp ./*.moon ./moons.d
wget "${GH_MIRROR}https://github.com/kaaass/ZeroTierOne/releases/download/mkmoonworld-1.0/mkmoonworld-x86_64"
# wget "${GH_MIRROR}https://github.com/kaaass/ZeroTierOne/releases/download/mkmoonworld-1.0/mkmoonworld-x86_64"
cp /app/mkmoonworld-x86_64 ./mkmoonworld-x86_64
chmod +x ./mkmoonworld-x86_64
./mkmoonworld-x86_64 moon.json
if [ $? -ne 0 ]; then
echo "mkmoonworld failed!"
exit 1
fi
mkdir -p /app/dist/
mv world.bin /app/dist/planet

BIN
mkmoonworld-x86_64 Executable file

Binary file not shown.