From 5533b8245082e88b7b116be04756340279e98246 Mon Sep 17 00:00:00 2001 From: ChrisCarini <6374067+ChrisCarini@users.noreply.github.com> Date: Fri, 3 Nov 2023 18:11:51 -0700 Subject: [PATCH] Add ARM architectures to Synology DSM7 --- pkg/synology/dsm7-docker/README.md | 5 +++++ pkg/synology/dsm7-docker/build.sh | 22 ++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/pkg/synology/dsm7-docker/README.md b/pkg/synology/dsm7-docker/README.md index 14bacde76..99cd979cf 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 acec5e0c9..1706ac686 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} \ + . } "$@"