Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Embed images rather than link

Eric Ball cristinapauna

...

Why Docker Hub is recommended for Multi-Arch

DockerHub is the mainstream popular docker registry which can support Manifest List, therefore can support Multi-Arch.

Successful Story

Dockerhub is now integrated in Akraino. Docker Hub registry is able to store manifest list (or fat manifests). A manifest list acts as a pointer to other images built for a specific architecture, thus making it possible to use the same name for images that are built on hardware with different architectures.

Image Added

Figure 1: Docker registry storing amd64, arm64 images and their fat manifest

In the picture above akraino/validation:k8s-latest is the fat manifest, and its name can be used to reference both images akraino/validation:k8s-amd64-latest and akraino/validation:k8s-arm64-latest. Inspecting the manifest offers the details on what images it has, for what hardware architecture and what OS.

Image Added

Figure 2: Docker fat manifest details

Custom job: validation

The validation project is already pushing to DockerhubDocker Hub, so if you would like to check out some template code, please take a look at ci-management/jjb/validation.

The docker images are in the official repo now [1] and the docker build jobs are passing [2].

[1] https://hub.docker.com/r/akraino/validation/

[2] https://jenkins.akraino.org/view/validation/job/validation-master-docker/

Other open source projects can refer this successful experience to integrate your DockerHub.

How to Connect Jenkins to DockerHub

The Jenkins slaves are connected to Dockerhub through the LF scripts and no extra steps are needed from users.

How to setup Jenkins

Docker needs to be installed on the Jenkins slave building the containers.

If you want to connect the slave to the LF master you'll need to install openjdk and monit and to follow the instructions provided by LF.

Docker file and image naming specifics to support Multi-Arch (Instruction Set Architecture)

Images that support multi-arch are handled with manifest list (a.k.a. fat manifest) mechanism. For more details on how this works in Akraino please check this article: https://www.lfedge.org/2019/07/09/using-dockerhub-in-akraino-edge-stack-other-linux-foundation-projects/

Building multi-arch images on your project

In order to have a multi-arch pipeline in your project you need to:

...