diff --git a/daemon/containerd/image.go b/daemon/containerd/image.go index 7ad5335813e7f..3e1bf98dede69 100644 --- a/daemon/containerd/image.go +++ b/daemon/containerd/image.go @@ -213,7 +213,13 @@ func (i *ImageService) resolveImage(ctx context.Context, refOrID string, platfor if !cerrdefs.IsNotFound(err) { return containerdimages.Image{}, err } - return containerdimages.Image{}, errdefs.NotFound(errors.New("id not found")) + // Some clients (such as the docker 17.03 CLI used in CI) still + // perform string-matching to detect that the *image* wasn't found. + // This requires the error to be prefixed with "No such image:". + // Without this prefix, the CLI prints the error message, and exits. + // + // FIXME(thaJeztah): we need to fix this; if needed, gated by API version (API < X add the prefix) + return containerdimages.Image{}, errdefs.NotFound(errors.New("No such image: " + refOrID)) } if platform != nil { cs := i.client.ContentStore()