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

c8d: Add ImageConvert #47678

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

vvoland
Copy link
Contributor

@vvoland vvoland commented Apr 4, 2024

Introduce a new ImageConvert operation to the image service (only supported by the containerd image store) to convert multi-platform image indexes.

The intent behind adding a new operation is to make the reduction of a multi-platform image to a single-platform image explicit to the user and not force operation like push to create a new image index with a different image digest if user wants to operate only on a subset of the original multi-platform image.

- How to verify it
TestImageConvert unit test.

Manual test with docker/cli#4983:
image

- Description for the changelog

- containerd image store: Add `POST /images/convert`
> [!WARNING]  
>
> This is experimental and may change at any time without any backward compatibility.

- A picture of a cute animal (not mandatory but encouraged)

Comment on lines 538 to 548
dst, err := reference.ParseNamed(r.Form.Get("to"))
if err != nil {
return errdefs.InvalidParameter(fmt.Errorf("invalid 'to' parameter: %w", err))
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also accept multiple tags.

@vvoland vvoland added this to the v-future milestone Apr 5, 2024
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Introduce a new `ImageConvert` operation to the image service (only
supported by the containerd image store) to convert multi-platform image
indexes.

The intent behind adding a new operation is to make the reduction of a
multi-platform image to a single-platform image explicit to the user and
not force operation like push to create a new image index with a
different image digest if user wants to operate only on a subset of the
original multi-platform image.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland force-pushed the c8d-multiplatform-convert branch 2 times, most recently from 67c33f8 to ec5e5bf Compare May 16, 2024 15:09
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland force-pushed the c8d-multiplatform-convert branch from ec5e5bf to 76a027b Compare May 16, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/images area/ux containerd-integration Issues and PRs related to containerd integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant