Skip to content

Add support for multi platform image #1010

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

Merged
merged 13 commits into from
Jul 30, 2025
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,16 @@ image-build: ## Build the EPP image using Docker Buildx.
$(LOAD) \
$(IMAGE_BUILD_EXTRA_OPTS) ./

.PHONY: multi-platform-init
multi-platform-init: ## Set up Docker Buildx for multi-platform builds.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kfswain @ahg-g where is the job that build the epp:main image?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@docker buildx inspect multiplatform >/dev/null 2>&1 || docker buildx create --name multiplatform --use
@docker run --privileged --rm tonistiigi/binfmt --install all
@docker buildx inspect --bootstrap

.PHONY: image-push
image-push: PUSH=--push ## Build the EPP image and push it to $IMAGE_REPO.
image-push: image-build
image-push: PLATFORMS=linux/amd64,linux/arm64
image-push: multi-platform-init image-build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to support both dev (single-arch) and release (multi-arch) workflows. Here is an untested example of what I was thinking to support multi-arch and support the different dev/release flows. @kfswain @ahg-g this does require updating the CI job, e.g. MULTI=true, to build multi-arch images.


.PHONY: image-load
image-load: LOAD=--load ## Build the EPP image and load it in the local Docker registry.
Expand Down