diff --git a/pkg/synology/dsm7-docker/README.md b/pkg/synology/dsm7-docker/README.md index 14bacde76b..99cd979cff 100644 --- a/pkg/synology/dsm7-docker/README.md +++ b/pkg/synology/dsm7-docker/README.md @@ -1,3 +1,8 @@ ## Docker image for Synology's DSM7 Documentation: [docs.zerotier.com/devices/synology](https://docs.zerotier.com/devices/synology) + +### Build & Push changes to DockerHub +```shell +./build.sh build +``` diff --git a/pkg/synology/dsm7-docker/build.sh b/pkg/synology/dsm7-docker/build.sh index acec5e0c90..1706ac686b 100755 --- a/pkg/synology/dsm7-docker/build.sh +++ b/pkg/synology/dsm7-docker/build.sh @@ -3,19 +3,17 @@ ZTO_VER=$(git describe --tags $(git rev-list --tags --max-count=1)) ZTO_COMMIT=$(git rev-parse HEAD) -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() -{ +build() { sudo docker login --username=${DOCKERHUB_USERNAME} - sudo docker push zerotier/zerotier-synology:${ZTO_VER} - sudo docker push zerotier/zerotier-synology:latest + + sudo docker buildx build \ + --push \ + --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \ + --tag zerotier/zerotier-synology:${ZTO_VER} \ + --tag zerotier/zerotier-synology:latest \ + --build-arg ZTO_COMMIT=${ZTO_COMMIT} \ + --build-arg ZTO_VER=${ZTO_VER} \ + . } "$@"