Skip to content

builder-next: remove support for deprecated schema1 images#50036

Merged
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:buildkit_rm_schema1
May 21, 2025
Merged

builder-next: remove support for deprecated schema1 images#50036
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:buildkit_rm_schema1

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented May 20, 2025

the core/remotes/docker/schema1 package is deprecated and removed in containerd v2.1; remove its use as we already deprecated these images for "docker pull" and elsewhere.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Remove support for pulling legacy v2, schema 1 images and remove `DOCKER_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE` environment-variable.

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


stopProgress()
// similar to [github.com/docker/docker/distribution/DeprecatedSchema1ImageError]
return nil, cerrdefs.ErrInvalidArgument.WithMessage(errors.New("support for Docker Image Format v1 and Docker Image manifest version 2, schema 1 has been removed. More information at https://docs.docker.com/go/deprecated-image-specs/"))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return nil, cerrdefs.ErrInvalidArgument.WithMessage(errors.New("support for Docker Image Format v1 and Docker Image manifest version 2, schema 1 has been removed. More information at https://docs.docker.com/go/deprecated-image-specs/"))
return nil, cerrdefs.ErrInvalidArgument.WithMessage(errors.New("support for Docker Image Format v1 and Docker Image manifest version 2, schema 1 has been removed in Docker Engine v28.2. More information at https://docs.docker.com/go/deprecated-image-specs/"))

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, yes, can change.

Looks like I messed this up as well as I changed this last-minute 😂

builder/builder-next/adapters/containerimage/pull.go:524:55: cannot use errors.New("support for Docker Image Format v1 and Docker Image manifest version 2, schema 1 has been removed. More information at https://docs.docker.com/go/deprecated-image-specs/") (value of interface type error) as string value in argument to cerrdefs.ErrInvalidArgument.WithMessage

the core/remotes/docker/schema1 package is deprecated and removed
in containerd v2.1; remove its use as we already deprecated these
images for "docker pull" and elsewhere.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

Let me bring this one in

@thaJeztah thaJeztah merged commit b3160e8 into moby:master May 21, 2025
144 checks passed
@thaJeztah thaJeztah deleted the buildkit_rm_schema1 branch May 21, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants