Skip to content

docker-to-squash.py: re-fetching a multi-arch image drops the registry or namespace #9290

Closed

Description

@dragonknightk

When skopeo inspect --raw returns a manifest list, get_manifest_from_docker_image picks the amd64 entry and fetches it again by digest. The new reference is built with image.split("/", 1)[-1], which drops everything before the first /:

>>> "registry.example.com/team/app:1.0".split("/", 1)[-1].split(":", 1)[0]
'team/app'
>>> "myorg/app:1".split("/", 1)[-1].split(":", 1)[0]
'app'

Storm 3.3.0-SNAPSHOT (master 4fca209). Reproduced with Python 3.9.

Expected: the second fetch keeps the full repository name and only replaces the tag with the digest, e.g. registry.example.com/team/app@<digest> and myorg/app@<digest>.

Actual: registry.example.com/team/app:1.0 is re-fetched as team/app@<digest> (the default registry, not registry.example.com), and myorg/app:1 is re-fetched as app@<digest> (library/app on Docker Hub, a different repository).

Follow-up from the review discussion in #9284 ʕ•ᴥ•ʔ

Activity

  1. changed the title [-]docker-to-squash.py: re-fetching a multi-arch image drops the registry and namespace[/-] [+]docker-to-squash.py: re-fetching a multi-arch image drops the registry or namespace[/+] on Nov 18, 2026
  2. added a commit that references this issue on Nov 23, 2026
    65bd6d0
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions