diff --git a/Dockerfile b/Dockerfile index 9dbef4c..1a00443 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM alpine:3.14 as builder ENV TZ=Asia/Shanghai +ARG TAG=main +ENV TAG=${TAG} WORKDIR /app ADD ./entrypoint.sh /app/entrypoint.sh @@ -19,6 +21,8 @@ RUN set -x\ && source "$HOME/.cargo/env"\ && git clone https://github.com/zerotier/ZeroTierOne.git\ && cd ZeroTierOne\ + && git checkout ${TAG}\ + && echo "切换到tag:${TAG}"\ && make ZT_SYMLINK=1 \ && make\ && make install\ diff --git a/README.md b/README.md index a0fa307..098a75d 100644 --- a/README.md +++ b/README.md @@ -396,7 +396,7 @@ services: - ./data/zerotier/dist:/app/dist - ./data/zerotier/ztncui:/app/ztncui - ./data/zerotier/one:/var/lib/zerotier-one - - ./data/config:/app/config + - ./data/zerotier/config:/app/config restart: unless-stopped ``` diff --git a/build.sh b/build.sh index 41efcb6..ef64dd8 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker build -t xubiaolin/zerotier-planet:latest . \ No newline at end of file +docker build --build-arg TAG=1.12.2 -t xubiaolin/zerotier-planet:latest . \ No newline at end of file diff --git a/deploy.sh b/deploy.sh index 53a89e8..76ef598 100755 --- a/deploy.sh +++ b/deploy.sh @@ -230,7 +230,7 @@ uninstall() { # -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 \ +# -v $(pwd)/data/zerotier/config:/app/config \ # --restart unless-stopped \ # xubiaolin/zerotier-planet:latest # }