mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-17 18:29:57 +00:00
Minor tweak to Synology Docker image script (#1936)
This commit is contained in:
parent
1f9a15dd18
commit
a8fde9e530
@ -1,19 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
ZTO_VER=$(git describe --abbrev=0 --tags)
|
||||
ZTO_VER=$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||
ZTO_COMMIT=$(git rev-parse HEAD)
|
||||
|
||||
build-and-push()
|
||||
build()
|
||||
{
|
||||
# build
|
||||
|
||||
sudo docker build --load --rm -t zerotier-synology . --build-arg ZTO_COMMIT=${ZTO_COMMIT} --build-arg ZTO_VER=${ZTO_VER}
|
||||
LATEST_DOCKER_IMAGE_HASH=$(sudo docker images -q zerotier-synology)
|
||||
sudo docker tag ${LATEST_DOCKER_IMAGE_HASH} zerotier/zerotier-synology:${ZTO_VER}
|
||||
sudo docker tag ${LATEST_DOCKER_IMAGE_HASH} zerotier/zerotier-synology:latest
|
||||
}
|
||||
|
||||
# push
|
||||
|
||||
push()
|
||||
{
|
||||
sudo docker login --username=${DOCKERHUB_USERNAME}
|
||||
sudo docker push zerotier/zerotier-synology:${ZTO_VER}
|
||||
sudo docker push zerotier/zerotier-synology:latest
|
||||
|
Loading…
Reference in New Issue
Block a user