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

Current implementation of images inspect is faulty (eg: RepoTags) #3004

Closed
apostasie opened this issue May 15, 2024 · 2 comments
Closed

Current implementation of images inspect is faulty (eg: RepoTags) #3004

apostasie opened this issue May 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@apostasie
Copy link
Contributor

Description

nerdctl does not deal properly with images bounds to multiple tags.

Steps to reproduce the issue

Compare:

sudo ./nerdctl pull dubodubonduponey/testouille
sudo ./nerdctl pull dubodubonduponey/testouille:2
sudo ./nerdctl inspect dubodubonduponey/testouille
sudo ./nerdctl inspect XXXXXXX

with

docker pull dubodubonduponey/testouille
docker pull dubodubonduponey/testouille:2
docker inspect dubodubonduponey/testouille
docker inspect XXXXXXX

Describe the results you received and expected

  1. when querying by reference, nerdctl returned result has in RepoTags ONLY the name used to query, regardless of the fact other tags may hold the same image
  2. when querying by id (that is bound to multiple tags), nerdctl returns multiple distinct images instead of just one

Compare with docker behavior.

What version of nerdctl are you using?

1.7.6

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

@apostasie apostasie added the kind/unconfirmed-bug-claim Unconfirmed bug claim label May 15, 2024
@apostasie
Copy link
Contributor Author

apostasie commented May 15, 2024

Note that the implementation is

func Inspect(ctx context.Context, client *containerd.Client, images []string, options types.ImageInspectOptions) error {

is problematic from the get-go, not just the implementation of ImageFromNative.

It assumes that every successive image returned from the walker needs a different entry.

@AkihiroSuda AkihiroSuda added bug Something isn't working and removed kind/unconfirmed-bug-claim Unconfirmed bug claim labels May 17, 2024
@apostasie
Copy link
Contributor Author

Fixed by #3017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants