cockpit-project / cockpit-podman

Cockpit UI for podman containers
GNU Lesser General Public License v2.1
432 stars 88 forks source link

Image does not show up in search? #819

Open TheSwede86 opened 2 years ago

TheSwede86 commented 2 years ago

Hello,

Sorry if this is a stupid question, quite new with Linux and also w. cockpit and cockpit-podman. Anyway I have installed podman and cockpit-podman on Ubuntu 20.04 and was looking to pull the "main-ubuntu"-release of "grafana/grafana" as per here: https://hub.docker.com/r/grafana/grafana/tags so the image is called "grafana/grafana" or "grafana" by "grafana" and the "tag" should be "main-ubuntu".

However I tried both (in cockpit-podman); Search for: "grafana" Tag: "main-ubuntu" yields a lot of results but I can't find the release by "grafana"

Search for: "grafana/grafana" Tag: "main-ubuntu" results in no hits at all.

index.docker.io and hub.docker.com both have the image; https://hub.docker.com/r/grafana/grafana https://index.docker.io/search?q=grafana&type=image ^ Nope index.docker.io SEEMS to have it but when actually clicking on it you get a 404. Weird. hub.docker.com has it however. ^^ I can search in both registries w.o being logged in (thought about that might be an issue where it only return results when you are authenticated but that wasn't it).

Err...am I missing something? I tried to adding "hub.docker.com" to "/etc/containers/registries.conf" but it then fails when searching in that registrary with: Error message: Failed to search for images: 1 error occurred: * couldn't search registry "hub.docker.com": pinging container registry hub.docker.com: invalid status code from registry 404 (Not Found)

Grateful for any pointers - Karl

jelly commented 2 years ago

Which version of cockpit-podman do you use? As far as I can see it's only available in ubuntu 20.10 and higher

TheSwede86 commented 2 years ago

Which version of cockpit-podman do you use? As far as I can see it's only available in ubuntu 20.10 and higher

Giving you the instructions I followed (did a writeup of various sources) but to answer your actual question; cockpit-podman_34-1_all.deb

Setting up podman and cockpit-podman

Install podman on Ubuntu 20.04

sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | sudo apt-key add - apt-get update -qq apt-get -qq --yes install podman (possibly run apt-get --fix-broken install for unmet dependencies)

Src: https://www.vultr.com/docs/how-to-install-and-use-podman-on-ubuntu-20-04

Install cockpit-podman on Ubuntu 20.04

Download current stable release here: https://launchpad.net/ubuntu/+source/cockpit-podman wget dpkg -i .deb

Src: https://github.com/cockpit-project/cockpit-podman/issues/481

jelly commented 2 years ago

Thanks for the information, I can see the issue locally as well. Searching for grafana in cockpit-podman gives a different result list then when searching on docker.io.

Hello,

Sorry if this is a stupid question, quite new with Linux and also w. cockpit and cockpit-podman. Anyway I have installed podman and cockpit-podman on Ubuntu 20.04 and was looking to pull the "main-ubuntu"-release of "grafana/grafana" as per here: https://hub.docker.com/r/grafana/grafana/tags so the image is called "grafana/grafana" or "grafana" by "grafana" and the "tag" should be "main-ubuntu".

I can reproduce the issue here too, and it can be reproduced with podman search grafana as well. We need to figure out if we can order the search results from podman in a bit more logical format. Even with

podman search grafana --limit 10000  | grep "grafana/grafana"

I can't find that image so it's an interesting issue!

However I tried both (in cockpit-podman); Search for: "grafana" Tag: "main-ubuntu" yields a lot of results but I can't find the release by "grafana"

Search for: "grafana/grafana" Tag: "main-ubuntu" results in no hits at all.

In podman searching with a slash (/) in a search query makes podman treat everything for the slash as a search registry. so you can search for example using docker.io/searchterm.

index.docker.io and hub.docker.com both have the image; https://hub.docker.com/r/grafana/grafana https://index.docker.io/search?q=grafana&type=image ^ Nope index.docker.io SEEMS to have it but when actually clicking on it you get a 404. Weird. hub.docker.com has it however. ^^ I can search in both registries w.o being logged in (thought about that might be an issue where it only return results when you are authenticated but that wasn't it).

Err...am I missing something? I tried to adding "hub.docker.com" to "/etc/containers/registries.conf" but it then fails when searching in that registrary with: Error message: Failed to search for images: 1 error occurred: * couldn't search registry "hub.docker.com": pinging container registry hub.docker.com: invalid status code from registry 404 (Not Found)

The registry for docker should be docker.io. hub.docker.com is just the frontend.

jelly commented 2 years ago

I've asked the podman team and unfortunately it's not simple to improve the container registry search as we are dependent on the registry for search results.

TheSwede86 commented 2 years ago

I've asked the podman team and unfortunately it's not simple to improve the container registry search as we are dependent on the registry for search results.

Thank you for checking! Can you link the issue (if you posted it on GitHub) you opened with podman here for cross-reference?

I guess the workaround would be to pull the image using podman pull docker.io/grafana/grafana:main-ubuntu but as you said you didn't find it when searching although you've limited it to 10000 results but I guess there aren't 10000 results for "grafana".

So it can't be found and therefore not downloaded even with an absolute "path" to the image?

I will try pulling it tomorrow using the command above.

Thanks again for confirming the issue / Karl