Cockpit: Containers: unable to pull images from non-docker.io registries

Created on 13 Nov 2017  路  12Comments  路  Source: cockpit-project/cockpit

I'm running Cockpit 154 as a container on Fedora 27 Atomic Host

From the 'Containers' tab, I want to pull an image from a registry that does not reside on docker.io

I click the 'Get new image' link and input the fully-qualified image name in the search box: registry.fedoraproject.org/fedora:26

The observed result is the 'spinning circle' where it looks like the system is waiting for something to happen. Nothing happens in a reasonable amount of time.

From the logs, it appears that a docker search command was issued with the fully-qualified image name:

time="2017-11-13T21:39:16.046826800Z" level=error msg="Handler for GET /v1.12/images/search?term=registry.fedoraproject.org%2Ffedora%3A26 returned error: Unexpected status code 404"

I think it is great to give the users the ability to search for images, but they should also have the ability to manually enter these fully-qualified images, too.

All 12 comments

Yeah, I agree, though the search issue probably blocks on the "search API isn't standardized" problem.

Any updates on this?

Suggestions welcome. We can't just adapt what we have because it's all based around search, most other registries don't really support that. So we need an alternate workflow for just pulling.

@andreasn do you have any suggestions?

The easiest route would seem to be that if an image with registry and tag is provided to bypass search and use it. Wording for the search would need to be updated to reflect that it's either a specific image or search term.

Could the pane that shows up after clicking the 'Get New Image' link support two fields?

One for search and one for directly inputting a registry/image:tag value that would be pulled?

Alternately, change the Containers page to have 'Pull New Image' and 'Search for New Image' buttons, where each brings up the appropriate pane?

I agree with @cgwalters that the proper solution here is for the Fedora Registry to start supporting search, because currently "docker search" from the CLI is broken in this regard as well. This is a bit at odds with the docker run command, where Fedora will try to download an image first from registry.fedoraproject.org, then registry.access.redhat.com, before attempting docker.io. So Fedora ranks those better for pulling, but not for searching (where it won't list things from registry.fedoraproject.org at all).

Maybe we could solve it with a "(+) Create New Container" button, where you get pretty much the same dialog as you do with "Run Image" today, but the Image field is a textbox rather than a label.
Potentially we could get rid of the current search box, and fold it all into this run dialog (with search built in to that Image entry, auto-completing against the registrys).

@andreasn We should have a UI that allows the user to avoid search. The docker CLI allows this, but Cockpit doesn't at this point.

Here is how it would work if we were to fold search into the run dialog.
Note for repos like fedora that doesn't support search, you could just feed it the whole string.

mockup

I agree with @cgwalters that the proper solution here is for the Fedora Registry to start supporting search, because currently "docker search" from the CLI is broken in this regard as well.

As great as that would be, that would only solve the issue for the Fedora Registry, no? What about registry.centos.org? Or a private registry that also doesn't support search?

I'm with @stefwalter that there should be parity with the docker CLI, so that the Cockpit user can avoid search.

As great as that would be, that would only solve the issue for the Fedora Registry, no? What about registry.centos.org? Or a private registry that also doesn't support search?

Indeed. I'm just saying Fedora and CentOS are broken out of the box in that respect.
The mockup I added above wouldn't depend on search. If it finds a match it will show that in the dropdown, but if you would be to input the string registry.fedoraproject.org/fedora:26, it would be happy about that too.

With Fedora/RHEL moving to podman, cockpit-docker has been in maintenance mode for quite some time. New development goes into cockpit-podman.

Was this page helpful?
0 / 5 - 0 ratings