diff --git a/daemon/containerd/image_push.go b/daemon/containerd/image_push.go index 1ef2627bf6050..ccd53aeeae036 100644 --- a/daemon/containerd/image_push.go +++ b/daemon/containerd/image_push.go @@ -89,6 +89,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) }