You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As artifacts become increasingly accepted, it would be useful for ORAS to support multi-arch artifacts as well.
There are already some standard conventions of tools like homebrew implementing this.
ORAS does not have CLI commands to author a manifest. Being able to author this multi arch manifest or index-based manifest would enable artifact authors to use ORAS CLI for scenarios like above.
Things to keep in mind
Multi-arch platform property is one way for clients to determine the artifact. This is already supported in ORAS throught the --platform flag.
Clients can choose to use annotations or any custom filter from index.
There could be an ability for clients to compose the manifest using a tag and add more artifacts in a multi step script and finally copy the full index and related manifests in one shot.
Composotion
sequenceDiagram
participant User
participant LocalRegistry as Local Store
participant RemoteRegistry as Remote Registry
User->>LocalRegistry: Begin creation of artifact with tag mybinary:v1 for amd64 linux
Note right of LocalRegistry: Artifact: mybinary:v1 (linux/amd64) initiated
User->>LocalRegistry: Add binary for a different platform (e.g. arm64)
Note right of LocalRegistry: Artifact: mybinary:v1 (linux/amd64, linux/arm64) updated
User->>LocalRegistry: Add binary with a different annotation
Note right of LocalRegistry: Artifact: mybinary:v1 (linux/amd64, linux/arm64, annotations)
User->>RemoteRegistry: Copy artifact mybinary:v1 from Local Registry
Note right of RemoteRegistry: Artifact: mybinary:v1 (linux/amd64, linux/arm64, annotations)
Loading
Appending
Consider appending a remote manifest and add a new item to the index
sequenceDiagram
participant User
participant RemoteRegistry1 as Local Store
participant RemoteRegistry2 as Remote Registry
User->>RemoteRegistry1: Inspect artifact with tag mybinary:v1
Note right of RemoteRegistry1: GET manifest details of mybinary:v1
User->>User: Determine modifications without pulling full artifact
User->>RemoteRegistry1: Add binary for a different platform (e.g. linux/arm64) directly
Note right of RemoteRegistry1: Artifact: mybinary:v1 (linux/amd64, linux/arm64) updated
User->>RemoteRegistry: Copy artifact mybinary:v1 from Local Registry
Note right of RemoteRegistry2: Artifact: mybinary:v1 (linux/amd64, linux/arm64) updated
Loading
Note
Currently Index implementations don't support artifactType in some registries and hence we should consider if tools need this even through it will be a part of the image spec.
Index support subject and we should consider how we will support subject properties to link and index to another artifact.
What is the version of your ORAS CLI
1.0.0
What would you like to be added?
As artifacts become increasingly accepted, it would be useful for ORAS to support multi-arch artifacts as well.
There are already some standard conventions of tools like homebrew implementing this.
Multi-arch manifest below - https://explore.ggcr.dev/?image=ghcr.io%2Fhomebrew%2Fcore%2Foras:1.0.1
{ "schemaVersion": 2, "manifests": [ { "mediaType": "application/vnd.oci.image.manifest.v1+json", "digest": "sha256:d0e42e6f6d564a9d1e178e72b42ff12b7e2e3c36cd32b44b150f7465c171db41", "size": 1914, "platform": { "architecture": "arm64", "os": "darwin", "os.version": "macOS 12.6" }, "annotations": { "org.opencontainers.image.ref.name": "1.0.1.arm64_monterey", "sh.brew.bottle.digest": "8690763d0a9d0be6574ee4cfdb8edbab302f232c8056bae2d0083f170719afed", "sh.brew.bottle.size": "3436422", "sh.brew.tab": "{\"homebrew_version\":\"4.1.4-6-ga8022e6\",\"changed_files\":[],\"source_modified_time\":1691075089,\"compiler\":\"clang\",\"runtime_dependencies\":[],\"arch\":\"arm64\",\"built_on\":{\"os\":\"Macintosh\",\"os_version\":\"macOS 12.6\",\"cpu_family\":\"dunno\",\"xcode\":\"14.2\",\"clt\":\"14.2.0.0.1.1668646533\",\"preferred_perl\":\"5.30\"}}" } },Each binary is uploaded with the following manifest
Why is this needed for ORAS?
ORAS does not have CLI commands to author a manifest. Being able to author this multi arch manifest or index-based manifest would enable artifact authors to use ORAS CLI for scenarios like above.
Things to keep in mind
Composotion
sequenceDiagram participant User participant LocalRegistry as Local Store participant RemoteRegistry as Remote Registry User->>LocalRegistry: Begin creation of artifact with tag mybinary:v1 for amd64 linux Note right of LocalRegistry: Artifact: mybinary:v1 (linux/amd64) initiated User->>LocalRegistry: Add binary for a different platform (e.g. arm64) Note right of LocalRegistry: Artifact: mybinary:v1 (linux/amd64, linux/arm64) updated User->>LocalRegistry: Add binary with a different annotation Note right of LocalRegistry: Artifact: mybinary:v1 (linux/amd64, linux/arm64, annotations) User->>RemoteRegistry: Copy artifact mybinary:v1 from Local Registry Note right of RemoteRegistry: Artifact: mybinary:v1 (linux/amd64, linux/arm64, annotations)Appending
Consider appending a remote manifest and add a new item to the index
sequenceDiagram participant User participant RemoteRegistry1 as Local Store participant RemoteRegistry2 as Remote Registry User->>RemoteRegistry1: Inspect artifact with tag mybinary:v1 Note right of RemoteRegistry1: GET manifest details of mybinary:v1 User->>User: Determine modifications without pulling full artifact User->>RemoteRegistry1: Add binary for a different platform (e.g. linux/arm64) directly Note right of RemoteRegistry1: Artifact: mybinary:v1 (linux/amd64, linux/arm64) updated User->>RemoteRegistry: Copy artifact mybinary:v1 from Local Registry Note right of RemoteRegistry2: Artifact: mybinary:v1 (linux/amd64, linux/arm64) updatedNote
artifactTypein some registries and hence we should consider if tools need this even through it will be a part of the image spec./cc @siggy