We've been working on the idea to enable multi-arch support on CNB. A mentorship project was created on LFX and this feature is part of the efforts to build the Minimal Viable Product (MVP) during the program duration.
These buildpacks are hosted in our docker hub repository and are available for Linux and Windows OS.
The idea is to create a new command pack buildpack manifest create to create a manifest list and combine those buildpacks. An update version of our previous ER-diagram will be:
A new feature on Pack can be implemented to help our users. The feature is inspired by the similar functionality in docker or podman
pack manifest create <manifest-list> <manifest> [<manifest> ... ]
options:
--format Manifest list type (oci or v2s2) to use when pushing the list (default is v2s2)
--publish Push a manifest list to a repository
Validations:
When the publish flag is used all the manifests MUST have os/arch defined otherwise an error must be thrown
The format flag will be ignored if it is not used in conjunction with the publish flag
Example
Based on the previous ER-diagram, we want to create a cnbs/sample-package:hello-multiarch-universe that combines the Linux and the Windows version of our current buildpacks.
By default the command will create a manifest list in the local storage using the docker media types (Version 2 schema 2 v2s2) with a content similar to:
Context
We've been working on the idea to enable multi-arch support on CNB. A mentorship project was created on LFX and this feature is part of the efforts to build the Minimal Viable Product (MVP) during the program duration.
More information can be found:
Description
Currently, the samples repository contains buildpacks and meta-buildpacks examples, using an ER diagram, we can represent those buildpacks as follow:
These buildpacks are hosted in our docker hub repository and are available for Linux and Windows OS.
The idea is to create a new command
pack buildpack manifest create
to create a manifest list and combine those buildpacks. An update version of our previous ER-diagram will be:Proposed solution
A new feature on Pack can be implemented to help our users. The feature is inspired by the similar functionality in docker or podman
Validations:
publish
flag is used all the manifests MUST have os/arch defined otherwise an error must be thrownformat
flag will be ignored if it is not used in conjunction with thepublish
flagExample
Based on the previous ER-diagram, we want to create a
cnbs/sample-package:hello-multiarch-universe
that combines the Linux and the Windows version of our current buildpacks.Using docker Media-Types:
By default the command will create a manifest list in the local storage using the docker media types (Version 2 schema 2 v2s2) with a content similar to:
Using OCI Media Types:
Assuming all the manifests have defined os/arch the expected output is a manifest list created in a remote registry with a content similar to:
Describe alternatives you've considered
Additional context