瀏覽代碼

Merge pull request #47454 from vvoland/c8d-pull-pullingfslayer-truncated

c8d/pull: Output truncated id for `Pulling fs layer`
Paweł Gronowski 1 年之前
父節點
當前提交
94f9f39b24
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      daemon/containerd/image_pull.go

+ 3 - 1
daemon/containerd/image_pull.go

@@ -21,6 +21,7 @@ import (
 	"github.com/docker/docker/internal/compatcontext"
 	"github.com/docker/docker/pkg/progress"
 	"github.com/docker/docker/pkg/streamformatter"
+	"github.com/docker/docker/pkg/stringid"
 	ocispec "github.com/opencontainers/image-spec/specs-go/v1"
 	"github.com/pkg/errors"
 )
@@ -118,7 +119,8 @@ func (i *ImageService) pullTag(ctx context.Context, ref reference.Named, platfor
 			sentSchema1Deprecation = true
 		}
 		if images.IsLayerType(desc.MediaType) {
-			progress.Update(out, desc.Digest.String(), "Pulling fs layer")
+			id := stringid.TruncateID(desc.Digest.String())
+			progress.Update(out, id, "Pulling fs layer")
 		}
 		if images.IsManifestType(desc.MediaType) {
 			if !sentPullingFrom {