Skip to content

[BUG] Pushing a digest instead of a tag fails #48

@matixlol

Description

@matixlol

Describe the bug

When pushing an image using its hash digest instead of its tag, the push fails at the end because Docker refuses to tag it by its digest.

How to reproduce

docker-pussh sha256:[HASH OF AN IMAGE] [SERVER]

[...]
2c264e01e207: Pull complete
Digest: sha256:2f704850b56e5f4829e275ea7a89bc1989c592b8d6fe7a6354b389418ca33833
Status: Downloaded newer image for localhost:57283/sha256:184bc3a64d5793895156d526cec7c92c628c9b20e3fb8e03088e7aa6d5f82180
localhost:57283/sha256:184bc3a64d5793895156d526cec7c92c628c9b20e3fb8e03088e7aa6d5f82180
Error response from daemon: refusing to create an ambiguous tag using digest algorithm as name
ERROR: Failed to retag image on remote host localhost:57283/sha256:184bc3a64d5793895156d526cec7c92c628c9b20e3fb8e03088e7aa6d5f82180 → sha256:184bc3a64d5793895156d526cec7c92c628c9b20e3fb8e03088e7aa6d5f82180
 ! Cleaning up after error...

Expected behavior

Unregistry skips tagging and just pushes the image to be used with its digest.

Environment:

docker-pussh, version 0.3.1
unregistry image: ghcr.io/psviderski/unregistry:0.1.3

# docker info in the server
Client: Docker Engine - Community
 Version:    28.5.1
 Context:    default

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions