In case after installing Podman Container service in Cockpit you are not able to search container images from Docker or other libraries, then here is the solution to resolve this problem.
We faced this issue after installing Podman Container on Debian 11 Bullseye, well even if you are using any other Linux operating system to run Cockpit and facing the same problem, still the solution given here will be the same.
Podman Container service is similar to Docker even the command line but daemon less. It is easy to find, run, build, share and deploy applications using the Open Containers Initiative on it.
1. Open Command terminal
Go to the server where you have installed the Cockpit Podman and access the terminal. You can access the command line of your remote server directly from the Cockpit Web Interface using the “Terminal” option.
2. Edit Podman registry configuration file:
Now, on your terminal enter the given command to edit the Registry file of Podman.
sudo nano /etc/containers/registries.conf
Once the file is opened, scroll to the end of the file and copy-paste the below-given lines.
[registries.search] registries = ['docker.io', 'registry.fedoraproject.org', 'quay.io', 'registry.access.redhat.com', 'registry.centos.org']
After that, Save the file by pressing Ctrl+O, hit the Enter key, and exit the same using Ctrl+X.
3. Restart Podman Service
To apply the made changes, restart the Podman service on your Linux operating system.
sudo systemctl restart podman
4. Search and Pull Container Images on Podman
Now, go to Cockpit Podman, hit the Get Image button.
Select the Owner for the Images you want to pull and then in the “Search for” box type the name of the Container Image you want to download via Cockpit Graphical user interface. For example – ubuntu
Once the list of the images appears, select the one and hit the Download button.
Soon you will see the downloaded images on your Podman web interface, select the one which to want to start, and hit the Play button.
In this way, we can use Podman on Cockpit to download Images and create containers of our choices.