Add possibility to build multi-architecture OCI base images

Bug #1929183 reported by Thomas Bechtold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Tom Wardill

Bug Description

The CPC team wants to use launchpad to build OCI/docker base images for multiple architectures.
For that, there are OCI ready tarballs available under https://partner-images.canonical.com/oci/ and theses tarballs can be directly used in a Dockerfile to build a OCI image:

FROM scratch
ARG arch
ADD ubuntu-impish-oci-amd64-root.tar.gz /
CMD ["/bin/bash"]

The problem is now, that we want to build the image for multiple architectures (and then have a multi-arch manifest file which references all the images for the different archs).
So there needs to be a way to replace amd64 in the Dockerfile with the current architecture.

As discussed with twom already, one possible solution might be having some default BUILD_ARGS which contains the architecture.

Related branches

Tom Wardill (twom)
Changed in launchpad:
status: New → Triaged
importance: Undecided → High
Tom Wardill (twom)
Changed in launchpad:
assignee: nobody → Tom Wardill (twom)
status: Triaged → In Progress
Colin Watson (cjwatson)
summary: - Add posibility to build multi architecture OCI base images
+ Add possibility to build multi-architecture OCI base images
Tom Wardill (twom)
Changed in launchpad:
status: In Progress → Fix Committed
Colin Watson (cjwatson)
Changed in launchpad:
status: Fix Committed → Fix Released
Revision history for this message
Tom Wardill (twom) wrote :

This is implemented as the build arg LAUNCHPAD_BUILD_ARCH, to prevent any collisions with other build systems.

Revision history for this message
Thomas Bechtold (toabctl) wrote :

Tested via https://launchpad.net/~toabctl/ubuntu-oci-base/+oci/ubuntu-base/+recipe/base-21.10 and test images are uploaded to https://hub.docker.com/repository/docker/toabctl/ubtest2 by launchpad. Seems to be working. Thanks a lot for the quick help!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.