Multi-arch controller container (#2037)

create arm64 & amd64 images for central controller
This commit is contained in:
Grant Limberg 2023-06-29 19:45:44 -04:00 committed by GitHub
parent 9b7d13476f
commit 0962af5e72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
313 changed files with 31474 additions and 20 deletions

View file

@ -176,9 +176,17 @@ official: FORCE
make ZT_OFFICIAL_RELEASE=1 -j 8 one
make ZT_OFFICIAL_RELEASE=1 mac-dist-pkg
central-controller-docker: FORCE
docker build --no-cache -t registry.zerotier.com/zerotier-central/ztcentral-controller:${TIMESTAMP} -f ext/central-controller-docker/Dockerfile --build-arg git_branch=$(shell git name-rev --name-only HEAD) .
_buildx:
@echo "docker buildx create"
# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker run --privileged --rm tonistiigi/binfmt --install all
@echo docker buildx create --name multiarch --driver docker-container --use
@echo docker buildx inspect --bootstrap
central-controller-docker: _buildx FORCE
docker buildx build --platform linux/arm64,linux/amd64 --no-cache -t us-central1-docker.pkg.dev/zerotier-central/zerotier/ztcentral-controller:${TIMESTAMP} -f ext/central-controller-docker/Dockerfile --build-arg git_branch=$(shell git name-rev --name-only HEAD) . --push
@echo Image: us-central1-docker.pkg.dev/zerotier-central/zerotier/ztcentral-controller:${TIMESTAMP}
clean:
rm -rf MacEthernetTapAgent *.dSYM build-* *.a *.pkg *.dmg *.o node/*.o controller/*.o service/*.o osdep/*.o ext/http-parser/*.o $(CORE_OBJS) $(ONE_OBJS) zerotier-one zerotier-idtool zerotier-selftest zerotier-cli zerotier doc/node_modules zt1_update_$(ZT_BUILD_PLATFORM)_$(ZT_BUILD_ARCHITECTURE)_* zeroidc/target/