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 <pawel.gronowski@docker.com>
(cherry picked from commit 16aa7dd67f
)
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
parent
97951c39fb
commit
be59afce2d
1 changed files with 3 additions and 1 deletions
|
@ -21,6 +21,7 @@ import (
|
||||||
"github.com/docker/docker/internal/compatcontext"
|
"github.com/docker/docker/internal/compatcontext"
|
||||||
"github.com/docker/docker/pkg/progress"
|
"github.com/docker/docker/pkg/progress"
|
||||||
"github.com/docker/docker/pkg/streamformatter"
|
"github.com/docker/docker/pkg/streamformatter"
|
||||||
|
"github.com/docker/docker/pkg/stringid"
|
||||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
@ -118,7 +119,8 @@ func (i *ImageService) pullTag(ctx context.Context, ref reference.Named, platfor
|
||||||
sentSchema1Deprecation = true
|
sentSchema1Deprecation = true
|
||||||
}
|
}
|
||||||
if images.IsLayerType(desc.MediaType) {
|
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 images.IsManifestType(desc.MediaType) {
|
||||||
if !sentPullingFrom {
|
if !sentPullingFrom {
|
||||||
|
|
Loading…
Reference in a new issue