Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: create a multi-arch docker builder #9

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions dev/push-etcd-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,14 @@ fi
# Build and upload etcd-manager images & binaries
DOCKER_REGISTRY=${DOCKER_REGISTRY} DOCKER_IMAGE_PREFIX=${DOCKER_IMAGE_PREFIX} DOCKER_TAG=${VERSION} make push

# Create a custom builder that is multi-arch capable
# See https://docs.docker.com/build/building/multi-platform/
docker buildx create \
--name container-builder \
--driver docker-container \
--use \
--bootstrap \
|| true # Ignore errors, assume the error is that the builder already exists

# Build and upload non-bazel images
BUILD_PLATFORMS=linux/amd64,linux/arm64 BUILD_ARGS=--push IMAGE_PREFIX=${DOCKER_REGISTRY}/${DOCKER_IMAGE_PREFIX} IMAGE_TAG=${VERSION} ${REPO_ROOT}/dev/tasks/build-images