Skip to content

crane: copy registry.k8s.io/pause:3.10 multi-platform images to quay.io failed #2078

Open
@xin3liang

Description

@xin3liang

Describe the bug

crane copy registry.k8s.io/pause:3.10 quay.io/xin3liang0/pause:3.10 multi-platform images failed.

To Reproduce

crane copy registry.k8s.io/pause:3.10 quay.io/xin3liang0/pause:3.10
2025/03/14 09:31:01 Copying from registry.k8s.io/pause:3.10 to quay.io/xin3liang0/pause:3.10
2025/03/14 09:31:02 existing manifest: sha256:e50b7059b633caf3c1449b8da680d11845cda4506b513ee7a2de00725f0a34a7
2025/03/14 09:31:02 existing manifest: sha256:7c38f24774e3cbd906d2d33c38354ccf787635581c122965132c9bd309754d4a
2025/03/14 09:31:02 existing blob: sha256:9d01e62aca03869527adbcbf895cdff3745216bb84b489638d479e0d6a02478e
...
Error: PUT https://quay.io/v2/xin3liang0/pause/manifests/sha256:e3ecdc4b6bd38ce47123195d566292581080abbb51b80603a9168f84fef0d1a2: MANIFEST_INVALID: manifest invalid; map[message:failed to parse manifest: manifest data does not match schema: 'application/vnd.docker.image.rootfs.diff.tar' is not one of ['
application/vnd.docker.image.rootfs.diff.tar.gzip', 'application/vnd.docker.image.rootfs.foreign.diff.tar.gzip']

Failed validating 'enum' in schema['properties']['layers']['items']['properties']['mediaType']:
    {'description': 'The MIME type of the referenced object. This should '
                    'generally be '
                    'application/vnd.docker.image.rootfs.diff.tar.gzip. '
                    'Layers of type '
                    'application/vnd.docker.image.rootfs.foreign.diff.tar.gzip '
                    'may be pulled from a remote location but they should '
                    'never be pushed.',
     'enum': ['application/vnd.docker.image.rootfs.diff.tar.gzip',
              'application/vnd.docker.image.rootfs.foreign.diff.tar.gzip'],
     'type': 'string'}

On instance['layers'][0]['mediaType']:
    'application/vnd.docker.image.rootfs.diff.tar']

Expected behavior

success

Additional context

One workaround is to use crane index filter to copy multi-platform images to quay.io.
crane index filter registry.k8s.io/pause:3.10 -t quay.io/xin3liang0/pause:3.10 --platform linux/amd64 --platform linux/arm64

Copy docker image to quay.io works
crane copy busybox:1.28.4 quay.io/xin3liang0/busybox:1.28.4

  • Output of crane version
    0.20.3
  • Registry used (e.g., GCR, ECR, Quay)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions