Browse Source

Merge pull request #45561 from laurazard/fix-pull-platform

fix: `docker pull` with platform checks wrong image tag
Bjorn Neergaard 2 năm trước cách đây
mục cha
commit
b42c65d796
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      daemon/images/image_pull.go

+ 1 - 1
daemon/images/image_pull.go

@@ -63,7 +63,7 @@ func (i *ImageService) PullImage(ctx context.Context, image, tag string, platfor
 		// we allow the image to have a non-matching architecture. The code
 		// we allow the image to have a non-matching architecture. The code
 		// below checks for this situation, and returns a warning to the client,
 		// below checks for this situation, and returns a warning to the client,
 		// as well as logging it to the daemon logs.
 		// as well as logging it to the daemon logs.
-		img, err := i.GetImage(ctx, image, imagetypes.GetImageOpts{Platform: platform})
+		img, err := i.GetImage(ctx, ref.String(), imagetypes.GetImageOpts{Platform: platform})
 
 
 		// Note that this is a special case where GetImage returns both an image
 		// Note that this is a special case where GetImage returns both an image
 		// and an error: https://github.com/docker/docker/blob/v20.10.7/daemon/images/image.go#L175-L183
 		// and an error: https://github.com/docker/docker/blob/v20.10.7/daemon/images/image.go#L175-L183