Multi-Architecture Images

One of the best things about Docker is its simplicity. However, as technologies grow, they inevitably get more complex. This happened for Docker when it started supporting different platforms and architectures, such as Windows and Linux on variations of ARM, x64, PowerPC, s390x and more. Suddenly, there were multiple versions of the same image for all the different architectures, and developers and users had to put in significant extra work to get the right version. This broke the smooth Docker experience.

Multi-architecture images to the rescue

Docker and the registry API adapted and became clever enough to hide images for multiple architectures behind a single tag. This means we can do a docker pull alpine on any architecture and get the correct version of the image. For example, if we’re on an AMD64 machine, we’ll get the AMD64 image.

Internal working of multi-architectural images

To make this happen, the Registry API supports two important constructs:

  • Manifest lists
  • Manifests

The manifest list is exactly what it sounds like — a list of architectures supported by an image tag. Each supported architecture then has its own manifest that lists the layers used to build it.

Run the following command to see the different architectures supported behind the alpine:latest tag.

Get hands-on with 1400+ tech skills courses.