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

@ -1,10 +1,10 @@
# Dockerfile for ZeroTier Central Controllers
FROM registry.zerotier.com/zerotier/controller-builder:latest as builder
FROM us-central1-docker.pkg.dev/zerotier-central/zerotier/ctlbuild:latest as builder
MAINTAINER Adam Ierymekno <adam.ierymenko@zerotier.com>, Grant Limberg <grant.limberg@zerotier.com>
ADD . /ZeroTierOne
RUN export PATH=$PATH:~/.cargo/bin && cd ZeroTierOne && make clean && make central-controller -j8
FROM registry.zerotier.com/zerotier/controller-run:latest
FROM us-central1-docker.pkg.dev/zerotier-central/zerotier/ctlrun:latest
COPY --from=builder /ZeroTierOne/zerotier-one /usr/local/bin/zerotier-one
RUN chmod a+x /usr/local/bin/zerotier-one
RUN echo "/usr/local/lib64" > /etc/ld.so.conf.d/usr-local-lib64.conf && ldconfig

View File

@ -0,0 +1,16 @@
registry = us-central1-docker.pkg.dev/zerotier-central/zerotier
all: controller-builder controller-runbase
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
controller-builder: buildx
docker buildx build --no-cache --platform linux/amd64,linux/arm64 -t $(registry)/ctlbuild:latest -f Dockerfile.builder . --push
controller-runbase: buildx
docker buildx build --no-cache --platform linux/amd64,linux/arm64 -t $(registry)/ctlrun:latest -f Dockerfile.run_base . --push

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More