Click on each book below to review & buy on Amazon.
As an Amazon Associate, I earn from qualifying purchases.
RHCSA - Manage Containers: Find & Retrieve Container Images From a Remote Registry
Remote Registries Configuration
There are two configuration files that remote registries can be listed in:
/etc/containers/registries.conf
: Global configuration file~/.config/containers/registries.conf
: User specific configuration file. Settings in here override the global configuration if different.
By default, the global configuration file contains the following entry:
unqualified-search-registries = ["registry.access.redhat.com", "registry.redhat.io", "docker.io"]
These are the registries that get searched and the order they are listed in matters, for example if you wanted docker.io
to be searched first you would amend the configuration to:
unqualified-search-registries = ["docker.io", "registry.access.redhat.com", "registry.redhat.io"]
The configured registries can also be view with the podman
info command:
Display configured container registries:
podman info | grep -A4 '^registries:'
This output should look similar to:
registries:
search:
- registry.access.redhat.com
- registry.redhat.io
- docker.io
Finding Container Images
To find container images you use the podman search
command followed by the name of the image you are searching for. If you do not specify a registry in the image name, the command will search all configured registries. You can also specify a registry that has not been configured, for example if docker.io
did not exist in /etc/containers/registries.conf
you could still search docker.io
for images.
There may be a scenario where you need to download a specific tagged version of an image. When performing a search you can add the --list-tags
options to see what tags are available.
Search for nginx
images for all configured repositories:
podman search nginx
The list is long so I have truncated the output you should receive, which shows the different images available from the 3 configured registries:
NAME DESCRIPTION
registry.access.redhat.com/ubi8/nginx-120 Platform for running nginx 1.20 or building...
registry.access.redhat.com/ubi8/nginx-118 Platform for running nginx 1.18 or building...
registry.access.redhat.com/ubi9/nginx-120 rhcc_registry.access.redhat.com_ubi9/nginx-1...
registry.access.redhat.com/ubi8/nginx-122 rhcc_registry.access.redhat.com_ubi8/nginx-1...
registry.access.redhat.com/ubi9/nginx-122 rhcc_registry.access.redhat.com_ubi9/nginx-1...
...
...
registry.redhat.io/rhel8/nginx-114 Nginx is a web server and a reverse proxy se...
registry.redhat.io/rhel8/nginx-118 Platform for running nginx 1.18 or building...
registry.redhat.io/ubi8/nginx-120 Platform for running nginx 1.20 or building...
registry.redhat.io/rhel9/nginx-120 rhcc_registry.access.redhat.com_rhel9/nginx-...
registry.redhat.io/rhel8/nginx-122 rhcc_registry.access.redhat.com_rhel8/nginx-...
registry.redhat.io/rhel8/nginx-116 Platform for running nginx 1.16 or building...
registry.redhat.io/ubi8/nginx-118 Platform for running nginx 1.18 or building...
registry.redhat.io/rhel8/nginx-120 Platform for running nginx 1.20 or building...
registry.redhat.io/ubi9/nginx-120 rhcc_registry.access.redhat.com_ubi9/nginx-1...
registry.redhat.io/ubi8/nginx-122 rhcc_registry.access.redhat.com_ubi8/nginx-1...
registry.redhat.io/rhel9/nginx-122 rhcc_registry.access.redhat.com_rhel9/nginx-...
registry.redhat.io/ubi9/nginx-122 rhcc_registry.access.redhat.com_ubi9/nginx-1...
...
...
docker.io/library/nginx Official build of Nginx.
docker.io/library/unit Official build of NGINX Unit: Universal Web...
docker.io/nginxinc/nginx-unprivileged Unprivileged NGINX Dockerfiles
docker.io/nginx/nginx-ingress NGINX and NGINX Plus Ingress Controllers fo...
docker.io/nginx/nginx-prometheus-exporter NGINX Prometheus Exporter for NGINX and NGIN...
docker.io/nginx/unit NGINX Unit is a dynamic web and application...
Search for all ubuntu
images from docker.io
container repositories:
podman search docker.io/ubuntu/
The output shows just the ubuntu
images for the docker.io
registry:
NAME DESCRIPTION
docker.io/ubuntu/nginx Nginx, a high-performance reverse proxy & we...
docker.io/ubuntu/squid Squid is a caching proxy for the Web. Long-t...
docker.io/ubuntu/cortex Cortex provides storage for Prometheus. Long...
docker.io/ubuntu/apache2 Apache, a secure & extensible open-source HT...
docker.io/ubuntu/kafka Apache Kafka, a distributed event streaming...
docker.io/ubuntu/mysql MySQL open source fast, stable, multi-thread...
docker.io/ubuntu/bind9 BIND 9 is a very flexible, full-featured DNS...
docker.io/ubuntu/prometheus Prometheus is a systems and service monitori...
docker.io/ubuntu/zookeeper ZooKeeper maintains configuration informatio...
docker.io/ubuntu/postgres PostgreSQL is an open source object-relation...
docker.io/ubuntu/redis Redis, an open source key-value store. Long-...
docker.io/ubuntu/grafana Grafana, a feature rich metrics dashboard &...
docker.io/ubuntu/memcached Memcached, in-memory keyvalue store for smal...
docker.io/ubuntu/dotnet-deps Chiselled Ubuntu for self-contained .NET & A...
docker.io/ubuntu/dotnet-aspnet Chiselled Ubuntu runtime image for ASP.NET a...
docker.io/ubuntu/cassandra Cassandra, an open source NoSQL distributed...
docker.io/ubuntu/dotnet-runtime Chiselled Ubuntu runtime image for .NET apps...
docker.io/ubuntu/telegraf Telegraf collects, processes, aggregates & w...
docker.io/ubuntu/chiselled-jre [MOVED TO ubuntu/jre] Chiselled JRE: distrol...
docker.io/ubuntu/jre Distroless Java runtime based on Ubuntu. Lon...
docker.io/ubuntu/loki Grafana Loki, a log aggregation system like...
docker.io/ubuntu/mlflow MLFlow: for managing the machine learning li...
docker.io/ubuntu/grafana-agent Ubuntu ROCK for Grafana Agent, an open-sourc...
Search for all available tagged versions for image docker.io/ubuntu/nginx
:
podman search --list-tags docker.io/ubuntu/nginx
The output shows all available tags that can be used for downloaded the desired container image:
NAME TAG
docker.io/ubuntu/nginx 1.18-20.04_beta
docker.io/ubuntu/nginx 1.18-20.04_edge
docker.io/ubuntu/nginx 1.18-21.04_beta
docker.io/ubuntu/nginx 1.18-21.04_edge
docker.io/ubuntu/nginx 1.18-21.10_beta
docker.io/ubuntu/nginx 1.18-21.10_edge
docker.io/ubuntu/nginx 1.18-22.04_beta
docker.io/ubuntu/nginx 1.18-22.04_edge
docker.io/ubuntu/nginx 1.22-22.10_beta
docker.io/ubuntu/nginx 1.22-22.10_edge
docker.io/ubuntu/nginx 1.22-23.04_beta
docker.io/ubuntu/nginx 1.22-23.04_edge
docker.io/ubuntu/nginx edge
docker.io/ubuntu/nginx latest
Retrieving Container Images
To retrieve container images you use the podman pull
command followed by the name of the image you are searching for.
It is worth noting that some remote registries may require a login, such as registry.redhat.io
. If you intend to download from this registry then use the podman login <registry>
command first
To confirm image downloads were successful you can use the podman images
command, which will list the images stored locally along with the tag information.
Download the latest nginx
image from docker.io/ubuntu/
:
To download the latest image, run:
podman pull docker.io/ubuntu/nginx
The command will output the download process to screen. Notice how the latest
tag was used by default as we did not specify any tags:
Trying to pull docker.io/ubuntu/nginx:latest...
Getting image source signatures
Copying blob 7d5ae4c6689d done
Copying blob 53253dcacce9 done
Copying blob 92209e819633 done
Copying blob aae2f0d5fcf6 done
Copying config 047208ad86 done
Writing manifest to image destination
Storing signatures
047208ad86d4796fa6211cc72dfe3a676a69f2e9fef666c85042a966a68585ec
Download an nginx
image by specifying a tag:
To specify the tag you include :tag
after the container image name:
The tag specified may be out of date by the time you follow along so make sure to swap the tag for a tag that was outputted in the Finding Container Images
exercises.
podman pull docker.io/ubuntu/nginx:1.22-22.10_beta
The command will output the download process and shows the tag we specified:
Trying to pull docker.io/ubuntu/nginx:1.22-22.10_beta...
Getting image source signatures
Copying blob 065dda2104ac done
Copying blob f2284a6d1734 done
Copying blob d7fafa60359f done
Copying blob 89be66ebf161 done
Copying config 8ee610fc81 done
Writing manifest to image destination
Storing signatures
8ee610fc817d95605218759b8dd16c5840984ad16d650e019ad20a0bdd8dddf4
Display all local images:
podman images
The output shows the tags and image ID. If you download the same image but using a different tag you would see a row for each tag of the image.
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/ubuntu/nginx latest 047208ad86d4 2 weeks ago 146 MB
docker.io/ubuntu/nginx 1.22-22.10_beta 8ee610fc817d 2 months ago 141 MB
Support DTV Linux
Click on each book below to review & buy on Amazon. As an Amazon Associate, I earn from qualifying purchases.
NordVPN ®: Elevate your online privacy and security. Grab our Special Offer to safeguard your data on public Wi-Fi and secure your devices. I may earn a commission on purchases made through this link.