Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show name for images #1164

Merged
merged 1 commit into from
Jun 29, 2022
Merged

show name for images #1164

merged 1 commit into from
Jun 29, 2022

Conversation

junnplus
Copy link
Member

@junnplus junnplus commented Jun 26, 2022

Signed-off-by: Ye Sijun junnplus@gmail.com

Fixes: #555

nerdctl images show some cri managed images in k8s.io namespace, like sha256:5d725196c1f47e72d2bc7069776d5928b1fb1e4adf09c18997733099aa3663ac, them can't parse out repo and tag.

Add --names flag to show the image name directly.

Before:

$ sudo CONTAINERD_NAMESPACE=k8s.io nerdctl images
REPOSITORY                            TAG                                                                 IMAGE ID        CREATED               PLATFORM       SIZE         BLOB SIZE
sha256                                5d725196c1f47e72d2bc7069776d5928b1fb1e4adf09c18997733099aa3663ac    b5bc69ac1e17    About an hour ago     linux/amd64    52.3 MiB     14.8 MiB
sha256                                a4ca41631cc7ac19ce1be3ebf0314ac5f47af7c711f17066006db82ee3b75b03    5b6ec0d6de9b    About an hour ago     linux/amd64    45.1 MiB     13.0 MiB
sha256                                a634548d10b032c2a1d704ef9a2ab04c12b0574afe67ee192b196a7f12da9536    7e75c20c0fb0    About an hour ago     linux/amd64    111.3 MiB    37.7 MiB
sha256                                aebe758cef4cd05b9f8cee39758227714d02f42ef3088023c1e3cd454f927a2b    13f53ed1d91e    About an hour ago     linux/amd64    289.3 MiB    97.4 MiB
sha256                                d3377ffb7177cc4becce8a534d8547aca9530cb30fac9ebe479b31102f1ba503    433696d8a908    About an hour ago     linux/amd64    127.4 MiB    32.2 MiB

After:

$ sudo CONTAINERD_NAMESPACE=k8s.io nerdctl images
REPOSITORY                            TAG        IMAGE ID        CREATED           PLATFORM       SIZE         BLOB SIZE
<none>                                <none>     b5bc69ac1e17    26 minutes ago    linux/amd64    52.3 MiB     14.8 MiB
<none>                                <none>     5b6ec0d6de9b    26 minutes ago    linux/amd64    45.1 MiB     13.0 MiB
<none>                                <none>     7e75c20c0fb0    26 minutes ago    linux/amd64    111.3 MiB    37.7 MiB
<none>                                <none>     13f53ed1d91e    26 minutes ago    linux/amd64    289.3 MiB    97.4 MiB
<none>                                <none>     433696d8a908    26 minutes ago    linux/amd64    127.4 MiB    32.2 MiB
$ sudo CONTAINERD_NAMESPACE=k8s.io nerdctl images --names
NAME                                                                       IMAGE ID        CREATED           PLATFORM       SIZE         BLOB SIZE
sha256:5d725196c1f47e72d2bc7069776d5928b1fb1e4adf09c18997733099aa3663ac    b5bc69ac1e17    2 hours ago       linux/amd64    52.3 MiB     14.8 MiB
sha256:a634548d10b032c2a1d704ef9a2ab04c12b0574afe67ee192b196a7f12da9536    7e75c20c0fb0    2 hours ago       linux/amd64    111.3 MiB    37.7 MiB
sha256:aebe758cef4cd05b9f8cee39758227714d02f42ef3088023c1e3cd454f927a2b    13f53ed1d91e    2 hours ago       linux/amd64    289.3 MiB    97.4 MiB
sha256:d3377ffb7177cc4becce8a534d8547aca9530cb30fac9ebe479b31102f1ba503    433696d8a908    2 hours ago       linux/amd64    127.4 MiB    32.2 MiB
$ sudo CONTAINERD_NAMESPACE=k8s.io nerdctl rmi sha256:34cdf99b1bb3b3a62c5b4226c3bc0983ab1f13e776269d1872092091b07203df
Untagged: sha256:34cdf99b1bb3b3a62c5b4226c3bc0983ab1f13e776269d1872092091b07203df@sha256:d255427f14c9236088c22cd94eb434d7c6a05f615636eac0b9681566cd142753
Deleted: sha256:0b031aac65698c8794dc6bc317a45589e07bc2db1421178f30a2c7f69a4a2cf5
Deleted: sha256:5a9b8acd98eab8ab4522da57208f4c958e33942dfb88745cad7db43c38c9a67d
Deleted: sha256:7afd3a7899f0f41b8081e457bf51be9dfe495fc6729908cb2f84ae6d86aaf45f

@junnplus junnplus force-pushed the cri-images branch 4 times, most recently from 387d3ef to bceb0d5 Compare June 26, 2022 18:19
@junnplus junnplus changed the title fix: show name for images show name for images Jun 26, 2022
@junnplus junnplus force-pushed the cri-images branch 3 times, most recently from 5fb91ca to 5d6b6fe Compare June 27, 2022 07:32
@junnplus junnplus marked this pull request as ready for review June 27, 2022 07:36
@junnplus junnplus force-pushed the cri-images branch 3 times, most recently from eea6d2c to 991efd1 Compare June 27, 2022 08:38
@junnplus junnplus requested a review from fahedouch June 27, 2022 10:07
@AkihiroSuda AkihiroSuda added the enhancement New feature or request label Jun 28, 2022
Signed-off-by: Ye Sijun <junnplus@gmail.com>
@fahedouch
Copy link
Member

Thanks

@AkihiroSuda AkihiroSuda self-requested a review June 28, 2022 14:33
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda added this to the vNext milestone Jun 29, 2022
@AkihiroSuda AkihiroSuda merged commit dd32d15 into containerd:master Jun 29, 2022
@stones123456
Copy link

good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to delete these images?
4 participants