Add ARM architectures to Synology DSM7

This commit is contained in:
ChrisCarini 2023-11-03 18:11:51 -07:00
parent 1bd2fecbf6
commit 5533b82450
2 changed files with 15 additions and 12 deletions

View File

@ -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
```

View File

@ -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} \
.
}
"$@"