Tweak DSM7 docker build target

This commit is contained in:
Joseph Henry 2022-05-31 12:48:52 -07:00
parent 1a400d33fd
commit 9b42ced27f
No known key found for this signature in database
GPG Key ID: C45B33FF5EBC9344
2 changed files with 7 additions and 6 deletions

View File

@ -511,10 +511,10 @@ snap-upload-stable: FORCE
done
synology-pkg: FORCE
cd synology ; ./build.sh build
cd pkg/synology ; ./build.sh build
synology-docker: FORCE
cd synology/dsm7-docker/; ./build.sh build
cd pkg/synology/dsm7-docker/; ./build.sh build-and-push
munge_rpm:
@:$(call check_defined, VERSION)

View File

@ -3,16 +3,17 @@
ZTO_VER=$(git describe --abbrev=0 --tags)
ZTO_COMMIT=$(git rev-parse HEAD)
build()
build-and-push()
{
# 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