Skip to content

Images

Warning

This documentation is deprecated, please check here for its new home

Multi Arch

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.

multi arch images

Below you can find different options to build and push multi-arch images.

GitLab Runners

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 docker-arm tag:

build_container_arm:
...
  tags:
  - docker-arm

docker buildx

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 .

With --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 .

Last update: June 1, 2022