From f5538d300d0b186016f9c15728a0542e8faaba79 Mon Sep 17 00:00:00 2001 From: Your Name <> Date: Fri, 17 May 2024 17:58:20 +0800 Subject: [PATCH] support arm --- Dockerfile | 1 - build.sh | 3 ++- patch/entrypoint.sh | 2 +- patch/mkworld_custom.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 40f9082..55ae5a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,7 +71,6 @@ 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/ZeroTierOne/attic/world/mkworld /var/lib/zerotier-one/mkworld RUN set -x \ && apk update \ diff --git a/build.sh b/build.sh index 33f26f9..a207dde 100755 --- a/build.sh +++ b/build.sh @@ -5,6 +5,7 @@ REPO=ZeroTierOne latest_tag=$(curl -s "https://api.github.com/repos/$USER/$REPO/tags" | jq -r '.[].name' | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$" | sort -V | tail -n 1) -echo "Latest tag for $USER/$REPO matching the format digit.digit.digit is: $latest_tag" +echo "Latest tag for $USER/$REPO matching latest is: $latest_tag" docker build --build-arg TAG="$latest_tag" -t "xubiaolin/zerotier-planet:$latest_tag" . +docker tag "xubiaolin/zerotier-planet:$latest_tag" "xubiaolin/zerotier-planet:latest" diff --git a/patch/entrypoint.sh b/patch/entrypoint.sh index 23618c0..953f611 100755 --- a/patch/entrypoint.sh +++ b/patch/entrypoint.sh @@ -64,7 +64,7 @@ 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 - ./mkworld moon.json + ./mkworld if [ $? -ne 0 ]; then echo "mkmoonworld failed!" exit 1 diff --git a/patch/mkworld_custom.cpp b/patch/mkworld_custom.cpp index 55651db..16830e8 100644 --- a/patch/mkworld_custom.cpp +++ b/patch/mkworld_custom.cpp @@ -92,7 +92,7 @@ int jsonToBinary() { const uint64_t ts = 1567191349589ULL; // August 30th, 2019 std::string fileContent; - if (!OSUtils::readFile("config.json", fileContent)) { + if (!OSUtils::readFile("moon.json", fileContent)) { fprintf(stderr, "Failed to open config file." ZT_EOL_S); return 1; }