Skip to content

[backport 24.0] c8d/inspect: Don't duplicate digested ref#46014

Merged
thaJeztah merged 1 commit intomoby:24.0from
vvoland:c8d-inspect-fix-duplicate-digested-24
Jul 18, 2023
Merged

[backport 24.0] c8d/inspect: Don't duplicate digested ref#46014
thaJeztah merged 1 commit intomoby:24.0from
vvoland:c8d-inspect-fix-duplicate-digested-24

Conversation

@vvoland
Copy link
Contributor

@vvoland vvoland commented Jul 18, 2023

If image name is already an untagged digested reference, don't produce additional digested ref.

Before:

$ docker pull busybox@sha256:2376a0c12759aa1214ba83e771ff252c7b1663216b192fbe5e0fb364e952f85c
$ docker inspect busybox@sha256:2376a0c12759aa1214ba83e771ff252c7b1663216b192fbe5e0fb364e952f85c
[
    {
        "Id": "sha256:2376a0c12759aa1214ba83e771ff252c7b1663216b192fbe5e0fb364e952f85c",
        "RepoTags": [],
        "RepoDigests": [
            "busybox@sha256:2376a0c12759aa1214ba83e771ff252c7b1663216b192fbe5e0fb364e952f85c",
            "busybox@sha256:2376a0c12759aa1214ba83e771ff252c7b1663216b192fbe5e0fb364e952f85c"
        ],
    ...

After:

$ docker pull busybox@sha256:2376a0c12759aa1214ba83e771ff252c7b1663216b192fbe5e0fb364e952f85c
$ docker inspect busybox@sha256:2376a0c12759aa1214ba83e771ff252c7b1663216b192fbe5e0fb364e952f85c
[
    {
        "Id": "sha256:2376a0c12759aa1214ba83e771ff252c7b1663216b192fbe5e0fb364e952f85c",
        "RepoTags": [],
        "RepoDigests": [
            "busybox@sha256:2376a0c12759aa1214ba83e771ff252c7b1663216b192fbe5e0fb364e952f85c"
        ],
    ...

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

If image name is already an untagged digested reference, don't produce
additional digested ref.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 028eab9)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland added area/images Image Distribution kind/bugfix PR's that fix bugs containerd-integration Issues and PRs related to containerd integration labels Jul 18, 2023
@vvoland vvoland added this to the 24.0.5 milestone Jul 18, 2023
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit 4f0747b into moby:24.0 Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/images Image Distribution containerd-integration Issues and PRs related to containerd integration kind/bugfix PR's that fix bugs status/4-merge

Projects

Development

Successfully merging this pull request may close these issues.

3 participants