Page tree
Skip to end of metadata
Go to start of metadata

Multi-Arch, Single Dockerfile

This section describes the learnings from StorPerf working on the container decomposition intern project.  The goal was to use a single Dockerfile to create images that can build any architecture supported by the multiarch/alpine docker repository.  The currently validated list from multiarch/alpine is:

TagReported unameDescription

Linux 4.10.0-19-generic #21-Ubuntu SMP Thu Apr 6 17:04:57 UTC 2017 aarch64 Linux

64 bit ARM (compatible with ENEA and ARMband pods)
armhfLinux 4.10.0-19-generic #21-Ubuntu SMP Thu Apr 6 17:04:57 UTC 2017 armv7l LinuxHard floating point.  Should work for Raspberry PIs
x86_64Linux 4.10.0-19-generic #21-Ubuntu SMP Thu Apr 6 17:04:57 UTC 2017 x86_64 Linux64 bit Generic x86 chip.  (Compatible with x86 64 bit based pods)

For StorPerf, we are only supporting aarch64 and x86_64.

The dockerfile is broken down as follows:

ARG ARCH=x86_64
FROM multiarch/alpine:$ARCH-$ALPINE_VERSION

The first line creates a default ARCH variable in case one is not specified.  This was required as part of the general Jenkins build procedure so as not to introduce a hard requirement for all projects to support an ARCH build arg.

The FROM line allows for changing of the build architecture as needed.

Once the resulting image is created, it gets pushed to Docker Hub as: opnfv/project-name:arch-version.  So for the StorPerf HTTP Frontend container for Euphrates on ARM would be:

  • No labels