What are Image Registries
A registry is a repository used to store and access container images. Container registries can support container-based application development, often as part of DevOps processes.
Container registries save developers valuable time in the creation and delivery of cloud-native applications, acting as the intermediary for sharing container images between systems. They essentially act as a place for developers to store container images and share them out via a process of uploading (pushing) to the registry and downloading (pulling) into another system, like a Kubernetes cluster.
Some examples of an image registry are Red Hat Quay and IBM Cloud Registry.
Quay Tutorial
Make sure you have Podman Desktop installed and up and running.
Here's how to find a list of publicly available container images on DockerHub.
NAME DESCRIPTION
docker.io/library/busybox Busybox base image.
docker.io/rancher/busybox
docker.io/openebs/busybox-client
docker.io/antrea/busybox
docker.io/hugegraph/busybox test image
...
We can create a busybox container image based off of the busybox base image you see listed in the output above.
The -it flag allows you to run the image in interactive mode. Interactive mode in Podman allows you to run a shell in a container and interact with it. However, you'll see that running small containers like this one don't have much to play around with in the interactive mode. To exit out of the interactive mode:
You can also share images in a public registry so that others can use and review them. Here's how to push your image up to quay.io.
Enter in the following info:Next, tag the image so that you can push it and find it in your account.
Make sure to replace "image_name" with the name of the image you want to push up to quay. Replace "user_name" with your quay.io username. Replace "image_registry_name" with what you want the image to be named/labeled as in quay.
Once the image is tagged, you can push it up to quay.
Your respository has now been pushed to Quay Container Registry!
To view your repository, click on the button below:
Make sure you have Docker Desktop installed and up and running.
First we'll create a container with a single new file based off of the busybox base image:
The container will immediately terminate, so we'll use the command below to list it: The next step is to commit the container to an image and then tag that image with a relevant name so it can be saved to a respository.Replace "container_id" with your container id from the previous command.
Be sure to replace "your_username" with your quay.io username and "respository_name" with a unique name for your repository.Now that we've tagged our image with a repository name, we can push the respository to Quay Container Registry:
Your respository has now been pushed to Quay Container Registry!To view your repository, click on the button below:
IBM Cloud Registry Tutorial
Before you begin, you need to install the IBM Cloud CLI so that you can run the IBM Cloud ibmcloud commands.
Then, you need to create a namespace. The namespace is created in the resource group that you specify so that you can configure access to resources within the namespace at the resource group level. If you don't specify a resource group, then the default is used.
Make sure to replace "my_namespace" with your preferred namespace.If you want to create the namespace in a specific resource group, use the following code before creating the namespace.
Replace "resource_group" with the resource group you want to create the namespace in.Next, you can pull images from IBM Cloud Registry to your local computer. Make sure Docker is installed and up and running.
Replace "source_image" with ther respository of the image and "tag" with the tag of the image that you want to use. Below is an example.