Skip to content

c8d: Add ImageConvert#47678

Draft
vvoland wants to merge 2 commits intomoby:masterfrom
vvoland:c8d-multiplatform-convert
Draft

c8d: Add ImageConvert#47678
vvoland wants to merge 2 commits intomoby:masterfrom
vvoland:c8d-multiplatform-convert

Conversation

@vvoland
Copy link
Copy Markdown
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` endpoint that allows to create new images by filtering the index of the source image. Supported options are:
  - `OnlyAvailablePlatforms` - discard image manifests for platforms that are not available locally
  - `Platforms` - discard image manifests that don't match any of the selected
  - `NoAttestations` - discard any build attestations
WARNING: This is experimental and may change at any time without any backward compatibility.

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

@vvoland vvoland added area/images Image Service containerd-integration Issues and PRs related to containerd integration area/ux labels Apr 4, 2024
@vvoland vvoland self-assigned this Apr 4, 2024
@vvoland vvoland force-pushed the c8d-multiplatform-convert branch from 442ddb2 to e9de94f Compare April 4, 2024 15:33
Comment thread api/server/router/image/image_routes.go Outdated
@vvoland vvoland added this to the v-future milestone Apr 5, 2024
@vvoland vvoland force-pushed the c8d-multiplatform-convert branch 5 times, most recently from a096594 to f616114 Compare May 20, 2024 15:50
@vvoland vvoland force-pushed the c8d-multiplatform-convert branch 5 times, most recently from 4bf65bc to 096b12f Compare June 4, 2024 14:29
@vvoland vvoland marked this pull request as ready for review June 4, 2024 15:16
vvoland added 2 commits June 27, 2024 18:12
Signed-off-by: Paweł Gronowski <[email protected]>
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 <[email protected]>
@vvoland vvoland force-pushed the c8d-multiplatform-convert branch from 096b12f to a1f9718 Compare June 27, 2024 16:12
@vvoland vvoland requested review from cpuguy83, thaJeztah and tianon June 27, 2024 17:57
@cpuguy83
Copy link
Copy Markdown
Member

cpuguy83 commented Jul 5, 2024

Maybe this one doesn't warrant a whole new API. It feels like this belongs in POST /images/create, and rather than passing along client side flags as API options the API should accept a manifest/index/descriptor.
I guess the main blocker there is the image inspect API does not provide the right information to make this happen easily.

@thompson-shaun thompson-shaun added this to the 29.0.0 milestone Mar 31, 2025
@thompson-shaun thompson-shaun moved this from Required for default containerd to Optional in Containerd-as-default May 22, 2025
@vvoland vvoland modified the milestones: 29.0.0, 30.0.0 Jul 10, 2025
@vvoland vvoland marked this pull request as draft April 30, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/images Image Service area/ux containerd-integration Issues and PRs related to containerd integration

Projects

Status: Optional
Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants