mirror of
https://github.com/xubiaolin/docker-zerotier-planet.git
synced 2025-01-22 12:48:14 -05:00
integrated-mkworld
This commit is contained in:
parent
b7eacd56aa
commit
9eeb40727f
@ -5,6 +5,7 @@ ENV TZ=Asia/Shanghai
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ADD ./entrypoint.sh /app/entrypoint.sh
|
ADD ./entrypoint.sh /app/entrypoint.sh
|
||||||
ADD ./http_server.js /app/http_server.js
|
ADD ./http_server.js /app/http_server.js
|
||||||
|
ADD ./mkmoonworld-x86_64 /app/mkmoonworld-x86_64
|
||||||
|
|
||||||
# init tool
|
# init tool
|
||||||
RUN set -x\
|
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/ZeroTierOne/zerotier-one /usr/sbin/zerotier-one
|
||||||
COPY --from=builder /app/entrypoint.sh /app/entrypoint.sh
|
COPY --from=builder /app/entrypoint.sh /app/entrypoint.sh
|
||||||
COPY --from=builder /app/http_server.js /app/http_server.js
|
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 \
|
RUN set -x ;sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
|
||||||
&& apk update \
|
&& apk update \
|
||||||
|
@ -218,7 +218,11 @@ function update() {
|
|||||||
-e API_PORT=${API_PORT} \
|
-e API_PORT=${API_PORT} \
|
||||||
-e FILE_SERVER_PORT=${FILE_PORT} \
|
-e FILE_SERVER_PORT=${FILE_PORT} \
|
||||||
-v $(pwd)/data/zerotier/dist:/app/dist \
|
-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() {
|
function menu() {
|
||||||
|
@ -63,9 +63,14 @@ function check_zerotier() {
|
|||||||
jq --argjson newEndpoints "$stableEndpoints" '.roots[0].stableEndpoints = $newEndpoints' moon.json >temp.json && mv temp.json moon.json
|
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
|
./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
|
chmod +x ./mkmoonworld-x86_64
|
||||||
./mkmoonworld-x86_64 moon.json
|
./mkmoonworld-x86_64 moon.json
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "mkmoonworld failed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p /app/dist/
|
mkdir -p /app/dist/
|
||||||
mv world.bin /app/dist/planet
|
mv world.bin /app/dist/planet
|
||||||
|
BIN
mkmoonworld-x86_64
Executable file
BIN
mkmoonworld-x86_64
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user