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

c8d/pull: Output truncated id for `Pulling fs layer`
This commit is contained in:
Paweł Gronowski 2024-02-27 13:28:38 +01:00 committed by GitHub
commit 94f9f39b24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {