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

add nerdctl images --digests (compatible with Docker, unlike ID) #442

Merged
merged 2 commits into from
Oct 19, 2021

Conversation

AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Oct 19, 2021

Commit 1: add nerdctl images --digests (compatible with Docker, unlike ID)

While the image ID is different from Docker in most cases, the DIGEST value
always corresponds to Docker.

$ docker  images --digests
REPOSITORY                          TAG       DIGEST                                                                    IMAGE ID       CREATED         SIZE
alpine                              latest    sha256:e1c082e3d3c45cccac829840a25941e679c25d438cc8412c2fa221cf1a824e6a   14119a10abf4   7 weeks ago     5.6MB

$ nerdctl images --digests
REPOSITORY    TAG       DIGEST                                                                     IMAGE ID        CREATED           SIZE
alpine        latest    sha256:e1c082e3d3c45cccac829840a25941e679c25d438cc8412c2fa221cf1a824e6a    e1c082e3d3c4    40 minutes ago    5.9 MiB

Commit 2: images: fix unparsable image name warning

Before:

$ nerdctl images
WARN[0000] unparsable image name "ghcr.io/stargz-containers/busybox@sha256:31a54a0cf86d7354788a8265f60ae6acb4b348a67efbcf7c1007dd3cf7af05ab"
REPOSITORY    TAG       IMAGE ID        CREATED           SIZE
                        31a54a0cf86d    15 minutes ago    1.3 MiB

After:

$ nerdctl images
REPOSITORY                           TAG       DIGEST                                                                     IMAGE ID        CREATED           SIZE
ghcr.io/stargz-containers/busybox    <none>    sha256:31a54a0cf86d7354788a8265f60ae6acb4b348a67efbcf7c1007dd3cf7af05ab    31a54a0cf86d    22 minutes ago    1.3 MiB

@AkihiroSuda AkihiroSuda added this to the v0.13.0 milestone Oct 19, 2021
@AkihiroSuda AkihiroSuda mentioned this pull request Oct 19, 2021
@fahedouch
Copy link
Member

fahedouch commented Oct 19, 2021

LGTM.

compatibility with docker image ID will be provided by this #346

While the image ID is different from Docker in most cases, the DIGEST value
always corresponds to Docker.

```console
$ docker  images --digests
REPOSITORY                          TAG       DIGEST                                                                    IMAGE ID       CREATED         SIZE
alpine                              latest    sha256:e1c082e3d3c45cccac829840a25941e679c25d438cc8412c2fa221cf1a824e6a   14119a10abf4   7 weeks ago     5.6MB

$ nerdctl images --digests
REPOSITORY    TAG       DIGEST                                                                     IMAGE ID        CREATED           SIZE
alpine        latest    sha256:e1c082e3d3c45cccac829840a25941e679c25d438cc8412c2fa221cf1a824e6a    e1c082e3d3c4    40 minutes ago    5.9 MiB
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Before:
```console
$ nerdctl images
WARN[0000] unparsable image name "ghcr.io/stargz-containers/busybox@sha256:31a54a0cf86d7354788a8265f60ae6acb4b348a67efbcf7c1007dd3cf7af05ab"
REPOSITORY    TAG       IMAGE ID        CREATED           SIZE
                        31a54a0cf86d    15 minutes ago    1.3 MiB
```

After:
```console
$ nerdctl images
REPOSITORY                           TAG       DIGEST                                                                     IMAGE ID        CREATED           SIZE
ghcr.io/stargz-containers/busybox    <none>    sha256:31a54a0cf86d7354788a8265f60ae6acb4b348a67efbcf7c1007dd3cf7af05ab    31a54a0cf86d    22 minutes ago    1.3 MiB
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda
Copy link
Member Author

Added another commit "images: fix unparsable image name warning"

@ktock @fahedouch Still LGTY?

compatibility with docker image ID will be provided by this #346

Thanks for working on this, but maybe we don't need to make it docker-compatible
#346 (comment)

We may revisit the issue later after completing multi-platform support.

@AkihiroSuda AkihiroSuda merged commit fa981ae into containerd:master Oct 19, 2021
ningmingxiao pushed a commit to ningmingxiao/nerdctl that referenced this pull request Oct 19, 2021
…ests

add `nerdctl images --digests` (compatible with Docker, unlike ID)
ningmingxiao pushed a commit to ningmingxiao/nerdctl that referenced this pull request Oct 20, 2021
…ests

add `nerdctl images --digests` (compatible with Docker, unlike ID)

Signed-off-by: ning.mingxiao <ning.mingxiao@zte.com.cn>
ningmingxiao pushed a commit to ningmingxiao/nerdctl that referenced this pull request Oct 20, 2021
…ests

add `nerdctl images --digests` (compatible with Docker, unlike ID)

Signed-off-by: ning.mingxiao <ning.mingxiao@zte.com.cn>
ningmingxiao pushed a commit to ningmingxiao/nerdctl that referenced this pull request Oct 20, 2021
…ests

add `nerdctl images --digests` (compatible with Docker, unlike ID)

Signed-off-by: ning.mingxiao <ning.mingxiao@zte.com.cn>
ningmingxiao pushed a commit to ningmingxiao/nerdctl that referenced this pull request Oct 20, 2021
…ests

add `nerdctl images --digests` (compatible with Docker, unlike ID)

Signed-off-by: ning.mingxiao <ning.mingxiao@zte.com.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants