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

podman search fails for docker.io/library images #20230

Closed
lnicola opened this issue Oct 2, 2023 · 7 comments
Closed

podman search fails for docker.io/library images #20230

lnicola opened this issue Oct 2, 2023 · 7 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@lnicola
Copy link

lnicola commented Oct 2, 2023

Issue Description

podman search docker.io/debian returns docker.io/library/debian, but podman search docker.io/library/debian doesn't.

docker search docker.io/library/debian works.

Steps to reproduce the issue

  1. podman search docker.io/debian
  2. podman search docker.io/library/debian

Describe the results you received

No results for docker.io/library/debian.

Describe the results you expected

Some results, just like with docker search docker.io/library/debian.

podman info output

podman 4.7.0 on Fedora 38 and quay.io/containers/podman:v4.6.1 (v4.7.0 is missing)

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

No

Additional environment details

No response

Additional information

Found by @strk.

@lnicola lnicola added the kind/bug Categorizes issue or PR as related to a bug. label Oct 2, 2023
@rhatdan
Copy link
Member

rhatdan commented Oct 2, 2023

@vrothberg, should we just strip library out of the search?

@rhatdan
Copy link
Member

rhatdan commented Oct 2, 2023

The following two commands work, so this is an issue with Podman probably not containers/image.
skopeo inspect docker://docker.io/library/debian
skopeo inspect docker://docker.io/debian

@boaz0
Copy link
Collaborator

boaz0 commented Oct 2, 2023

@rhatdan can you assign this to me. I believe I have some time to kill on this.

@rhatdan
Copy link
Member

rhatdan commented Oct 2, 2023

You got it, I have a feeling this is something to do with containers/common/libimage.

@vrothberg
Copy link
Member

Thanks, @boaz0 !

@boaz0
Copy link
Collaborator

boaz0 commented Oct 5, 2023

It seems like docker are removing the "library" from the search term if RegistryIndexInfo is official:

	if index.Official {
		// If pull "library/foo", it's stored locally under "foo"
		remoteName = strings.TrimPrefix(remoteName, "library/")
	}

https://github.com/moby/moby/blob/master/registry/search.go#L99-L102

Maybe I can apply something similar in common/libimage

@Luap99
Copy link
Member

Luap99 commented Oct 17, 2023

Looks like the fix (containers/image#2133) was merged, and will be included in podman the next we update c/image

@Luap99 Luap99 closed this as completed Oct 17, 2023
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Jan 16, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants