How to build multiarch container images and push them to a registry

Building the images

podman build --platform linux/arm64,linux/amd64 --manifest ghcr.io/aero-project-eu/maestro-serverless-controller/jvm:20250910 . -f src/main/docker/Dockerfile.jvm

This will create a multiarch manifest named ghcr.io/aero-project-eu/maestro-serverless-controller/jvm:20250910 that includes both linux/arm64 and linux/amd64 images. Both images will be built using the provided dockerfile and pushed to the specified registry.

Pushing the images

podman manifest push ghcr.io/aero-project-eu/maestro-serverless-controller/jvm:20250910

This will push the multiarch manifest along with the individual images to the registry.

Typically registries require authentication. You can login using:

podman login ghcr.io

You will be prompted for a username and password. You may use your GitHub username as the username and a personal access token with the read:packages and write:packages scopes as the password.

Next