Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create SOCI Indexes when pushing multiple platforms #2644

Open
ollypom opened this issue Nov 16, 2023 · 1 comment
Open

Create SOCI Indexes when pushing multiple platforms #2644

ollypom opened this issue Nov 16, 2023 · 1 comment

Comments

@ollypom
Copy link
Contributor

ollypom commented Nov 16, 2023

What is the problem you're trying to solve

A SOCI index is tied to a container image manifest not a manifest list / image index. In #2467 we added support to generate a SOCI Index on push with nerdctl push --snapshotter soci however today this fails if you attempt to push multiple platforms at the same time.

Current behavior today:

$ nerdctl image ls
REPOSITORY                                                 TAG       IMAGE ID        CREATED           PLATFORM       SIZE         BLOB SIZE
111222333444.dkr.ecr.eu-west-1.amazonaws.com/nginx-demo    latest    cd6043ce93a0    9 minutes ago     linux/arm64    670.5 MiB    235.1 MiB
111222333444.dkr.ecr.eu-west-1.amazonaws.com/nginx-demo    latest    cd6043ce93a0    9 minutes ago     linux/amd64    0.0 B        241.6 MiB

With the --all-platforms flag results in a confusing "true" not found error.

$ nerdctl push --snapshotter soci --all-platforms 111222333444.dkr.ecr.eu-west-1.amazonaws.com/nginx-demo
index-latest@sha256:cd6043ce93a09b7ab1086837945401dbd63ad78da23c50fd2128ce8e80aaf5a1: done           |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:efbf016ba665281867463004baa20cd764f049fb520d1d1d2dcdeb5c01bfb386:     done           |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:bdae03687df2d8f4ecbfef44a51228064c012cc20a29eaf315a1d5ee38fb6716:     done           |++++++++++++++++++++++++++++++++++++++|
config-sha256:d3e6c5969420b426f5a909b2520fe2699c385ef3011f99b3e297a73c7c30c03e:       done           |++++++++++++++++++++++++++++++++++++++|
config-sha256:8207b6dd7ee1e3b31d05b519da6affa53c28e031e636dc1f490476c734f3edaf:       done           |++++++++++++++++++++++++++++++++++++++|
elapsed: 1.4 s                                                                        total:  5.0 Ki (3.6 KiB/s)
INFO[0001] soci: soci: image "true": not found         

When specifying specific platforms the regex fails because of the comma.

$ nerdctl push --snapshotter soci --platform=amd64,arm64 111222333444.dkr.ecr.eu-west-1.amazonaws.com/nginx-demo
INFO[0000] pushing as a reduced-platform image (application/vnd.oci.image.index.v1+json, sha256:cd6043ce93a09b7ab1086837945401dbd63ad78da23c50fd2128ce8e80aaf5a1)
index-latest@sha256:cd6043ce93a09b7ab1086837945401dbd63ad78da23c50fd2128ce8e80aaf5a1: done           |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:efbf016ba665281867463004baa20cd764f049fb520d1d1d2dcdeb5c01bfb386:     done           |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:bdae03687df2d8f4ecbfef44a51228064c012cc20a29eaf315a1d5ee38fb6716:     done           |++++++++++++++++++++++++++++++++++++++|
config-sha256:8207b6dd7ee1e3b31d05b519da6affa53c28e031e636dc1f490476c734f3edaf:       done           |++++++++++++++++++++++++++++++++++++++|
config-sha256:d3e6c5969420b426f5a909b2520fe2699c385ef3011f99b3e297a73c7c30c03e:       done           |++++++++++++++++++++++++++++++++++++++|
elapsed: 1.4 s                                                                        total:  5.0 Ki (3.6 KiB/s)
INFO[0001] soci: soci: could not parse platform amd64,arm64: "amd64,arm64" is an invalid component of "amd64,arm64": platform specifier component must match "^[A-Za-z0-9_-]+$": invalid argument                           

Describe the solution you'd like

A SOCI Index for each platform is created and pushed.

Additional context

No response

@monirul
Copy link
Contributor

monirul commented Feb 6, 2024

I am able to reproduce this at my end. Investigating the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants