Skip to content

ctr image import output show dash in image names as space #13097

@VannTen

Description

@VannTen

Description

When importing an OCI archive (generated with skopeo, it that is relevant), ctr image import works correctly, however the output is slightly misleading, as dash (-) in the image name are replaced by space.
The image is listed correctly though in ctr images ls

Steps to reproduce the issue

$ skopeo copy 'docker://quay.io/calico/kube-controllers:v3.30.6' oci-archive:/tmp/archive.tar:quay.io/calico/kube-controllers:v3.30.6
...
# ctr image import /tmp/archive.tar
quay.io/calico/kube controllers:v3.30.6 	saved	# note the space instead of dash
application/vnd.oci.image.manifest.v1+json sha256:c6434b5f0e811aabb1f41fd8d1b00a38f25d991c18f52e9a31fa34e4dada0fb7
Importing	elapsed: 0.8 s	total:   0.0 B	(0.0 B/s)	
# ctr images list
REF                                     TYPE                                       DIGEST                                                                  SIZE     PLATFORMS   LABELS 
quay.io/calico/kube-controllers:v3.30.6 application/vnd.oci.image.manifest.v1+json sha256:c6434b5f0e811aabb1f41fd8d1b00a38f25d991c18f52e9a31fa34e4dada0fb7 50.4 MiB linux/amd64 -      

Describe the results you received and expected

Have the ouput of ctr match the actual image name

What version of containerd are you using?

containerd github.com/containerd/containerd/v2 v2.2.1 dea7da5.m

Any other relevant information

ctr version:

Client:
  Version:  v2.2.1
  Revision: dea7da592f5d1d2b7755e3a161be07f43fad8f75.m
  Go version: go1.25.5 X:nodwarf5

Server:
  Version:  v2.2.1
  Revision: dea7da592f5d1d2b7755e3a161be07f43fad8f75.m
  UUID: 9e6a692d-5c1f-47b1-aaae-20d19693c829

skopeo version:

skopeo version 1.22.0 commit: 23dddaad3d8f86f8c1d3204646b14aa0da86a85e

Show configuration if it is related to CRI plugin.

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions