Skip to content

Implement ImageDelete for containerd#11

Merged
ndeloof merged 1 commit intomasterfrom
c8d-image-delete
Jul 11, 2022
Merged

Implement ImageDelete for containerd#11
ndeloof merged 1 commit intomasterfrom
c8d-image-delete

Conversation

@rumpl
Copy link
Copy Markdown
Owner

@rumpl rumpl commented Jul 8, 2022

- What I did

Implemented image deletion for containerd

@rumpl
Copy link
Copy Markdown
Owner Author

rumpl commented Jul 8, 2022

The failure is some swarm error, don't think it's related

@rumpl rumpl requested review from ndeloof, thaJeztah and vvoland July 8, 2022 13:50
Comment thread daemon/containerd/service.go Outdated

resolver := newResolverFromAuthConfig(authConfig)
opts = append(opts, containerd.WithResolver(resolver))
opts = append(opts, containerd.WithPullUnpack)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Indeed, removed it

Comment thread daemon/containerd/service.go Outdated
}
ref := reference.TagNameOnly(parsedRef)

if err := cs.client.ImageService().Delete(ctx, ref.String()); err != nil {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How about passing containerdimages.SynchronousDelete() to Delete?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Nice!

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
@rumpl rumpl force-pushed the c8d-image-delete branch from 8e6d824 to 4f9e485 Compare July 11, 2022 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants