From 8c78edc441d3311e6f41f96ed9e13f974719e811 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 24 Feb 2024 00:16:08 +0800 Subject: [PATCH] addbuildtag --- Dockerfile | 4 ++++ build.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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/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