This documentation is deprecated, please check here for its new home
Our central registry.cern.ch has support for multiple architecture images, even sharing the same tag. The container runtimes (docker, containerd, kubernetes, etc) will pull the image matching the architecture.
You can find the details by browsing the artifacts in an image. Not obvious from the UI, so here are a couple screenshots.
Below you can find different options to build and push multi-arch images.
Default GitLab runners will build images for x86/64.
There are additional runners on native ARM hardware. Follow the CI/CD examples and pass an additional
build_container_arm: ... tags: - docker-arm
Note: This will not work on lxplus8-arm as docker is an alias for podman there
The docker client has support for multi-arch builds with buildx multi-platform, without requiring access to dedicated hardware. Here's a simple example:
docker buildx build --platform linux/arm64/v8,linux/amd64 --tag registry.cern.ch/MYREPO/MYIMAGE:MYTAG .
--push you can also push the images to the target registry:
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag registry.cern.ch/MYREPO/MYIMAGE:MYTAG .