diff --git a/daemon/containerd/image_push.go b/daemon/containerd/image_push.go index 8688ade8090f2..4d519a22d350f 100644 --- a/daemon/containerd/image_push.go +++ b/daemon/containerd/image_push.go @@ -93,6 +93,9 @@ func (i *ImageService) pushRef(ctx context.Context, targetRef reference.Named, m img, err := i.client.ImageService().Get(ctx, targetRef.String()) if err != nil { + if cerrdefs.IsNotFound(err) { + return errdefs.NotFound(fmt.Errorf("tag does not exist: %s", reference.FamiliarString(targetRef))) + } return errdefs.NotFound(err) }