Images with same name cannot be compared. · Issue #74 · reproducible-containers/diffoci · GitHub
Skip to content

Images with same name cannot be compared. #74

Open

Description

@IvanT24

When loading an image with the same name as an already loaded image, it will be overwritten. I wanted to compare images with the same name built in two different environments, but i had to first use the docker tag command to change the name of one of the images before I exported it.

Activity

  1. omus commented on Jul 27, 2024

    @omus

    Does using the digest hash work? e.g. debian@sha256:45f2e735295654f13e3be10da2a6892c708f71a71be845818f6058982761a6d3. You can determine the digest for your images with docker image ls --digests <image>.

  2. Antiz96 commented on Mar 31, 2026

    @Antiz96

    [...] but i had to first use the docker tag command to change the name of one of the images before I exported it.

    For what it's worth, this is not a fully satisfactory solution as "renaming" an image with docker tag will reflect said rename in the image annotations metadata (in io.containerd.image.name & org.opencontainers.image.ref.name), which diffoci will complain about (if not ran with the --semantic flag).

    See for instance the following diffoci output (with the difference being introduced by using docker tag to "rename" one of the images with the "-rebuild" suffix, in order to avoid name collision).

    - 	"org.opencontainers.image.ref.name": "repro-repro",
    + 	"org.opencontainers.image.ref.name": "repro-repro-rebuild",
    

    I tried to find a way to either rename / retag the image while preserving the original annotations metadata or, alternatively, find a way to edit the annotations back to their original value afterwards but I haven't been able to find a solution / workaround for that yet 😕

    Note that I'm not implying that this is an issue with diffoci, I'm aware it's just doing its job here 😛
    More of a limitation of the Docker / Podman image format I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions