Skip to content

Commit 16aa7dd

Browse files
committed
c8d/pull: Output truncated id for Pulling fs layer
All other progress updates are emitted with truncated id. ```diff $ docker pull --platform linux/amd64 alpine Using default tag: latest latest: Pulling from library/alpine -sha256:4abcf20661432fb2d719aaf90656f55c287f8ca915dc1c92ec14ff61e67fbaf8: Pulling fs layer +4abcf2066143: Download complete Digest: sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b Status: Image is up to date for alpine:latest docker.io/library/alpine:latest ``` Signed-off-by: Paweł Gronowski <[email protected]>
1 parent 8cdb5a9 commit 16aa7dd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

daemon/containerd/image_pull.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/docker/docker/internal/compatcontext"
2222
"github.com/docker/docker/pkg/progress"
2323
"github.com/docker/docker/pkg/streamformatter"
24+
"github.com/docker/docker/pkg/stringid"
2425
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
2526
"github.com/pkg/errors"
2627
)
@@ -118,7 +119,8 @@ func (i *ImageService) pullTag(ctx context.Context, ref reference.Named, platfor
118119
sentSchema1Deprecation = true
119120
}
120121
if images.IsLayerType(desc.MediaType) {
121-
progress.Update(out, desc.Digest.String(), "Pulling fs layer")
122+
id := stringid.TruncateID(desc.Digest.String())
123+
progress.Update(out, id, "Pulling fs layer")
122124
}
123125
if images.IsManifestType(desc.MediaType) {
124126
if !sentPullingFrom {

0 commit comments

Comments
 (0)