Skip to content

Commit

Permalink
Merge pull request #44257 from tockn/master
Browse files Browse the repository at this point in the history
fix typo
  • Loading branch information
thaJeztah committed Oct 22, 2022
2 parents fffa947 + 89a9d7d commit 40b3fc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions daemon/images/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ func (i *ImageService) GetImage(ctx context.Context, refOrID string, options ima
}
p := *options.Platform
// Note that `platforms.Only` will fuzzy match this for us
// For example: an armv6 image will run just fine an an armv7 CPU, without emulation or anything.
// For example: an armv6 image will run just fine on an armv7 CPU, without emulation or anything.
if OnlyPlatformWithFallback(p).Match(imgPlat) {
return
}
// In some cases the image config can actually be wrong (e.g. classic `docker build` may not handle `--platform` correctly)
// So we'll look up the manifest list that coresponds to this imaage to check if at least the manifest list says it is the correct image.
// So we'll look up the manifest list that corresponds to this image to check if at least the manifest list says it is the correct image.
var matches bool
matches, retErr = i.manifestMatchesPlatform(ctx, retImg, p)
if matches || retErr != nil {
Expand All @@ -179,7 +179,7 @@ func (i *ImageService) GetImage(ctx context.Context, refOrID string, options ima
// The image store does not store the manifest list and image tags are assigned to architecture specific images.
// So we can have a `foo` image that is amd64 but the user requested armv7. If the user looks at the list of images.
// This may be confusing.
// The alternative to this is to return a errdefs.Conflict error with a helpful message, but clients will not be
// The alternative to this is to return an errdefs.Conflict error with a helpful message, but clients will not be
// able to automatically tell what causes the conflict.
retErr = errdefs.NotFound(errors.Errorf("image with reference %s was found but does not match the specified platform: wanted %s, actual: %s", refOrID, platforms.Format(p), platforms.Format(imgPlat)))
}()
Expand Down

0 comments on commit 40b3fc7

Please sign in to comment.