Skip to content

Expose docker schema 1 image usage by adding a new label #9202

@qiutongs

Description

@qiutongs

What is the problem you're trying to solve

Containerd 2.0 will remove the support for docker schema 1 images. To facilitate the transition, I am looking for ways to better expose its usage. One idea I have is to add a new label to docker schema 1 image in containerd v1.X.

Describe the solution you'd like

Here is my proposed implementation.

  1. We append a new label converted=dockerV1 if the image gets converted in https://github.com/containerd/containerd/blob/v1.7.2/pull.go#L276. In the fetch function, this can be easily determined.
  2. Then, when the image metadata is stored, it will have that label so that ctr images can query it. https://github.com/containerd/containerd/blob/v1.7.2/pull.go#L285
  3. CRI image pull calls client.Pull in https://github.com/containerd/containerd/blob/v1.7.2/pkg/cri/server/image_pull.go#L183

Additional context

The label name can be further discussed. I am open to suggestion.

If people think this is a good solution, I will create a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions