The outcomes of this guide are:
How to Use Docker Hub to Search for Images
To use the Docker Hub for searching images, follow the below-mentioned instructions.
First, open your favorite web browser, move to the Docker Hub, and sign in with your account:
Then, provide the required information in the given fields and hit the Continue button:
After doing so, you will log in to your Docker Hub account. Now, specify the desired Docker image name in the fields and then click on the Enter button. In our case, we have searched for the Ubuntu image:
As a result, you will get the image details on your screen. Now, you can download it by executing the docker push <image-name:tag> command on your local machine:
How to Search for Images from Docker Hub through CLI
Another way to search the image from Docker Hub is through the CLI. To do so, first, you need to log in with Docker by executing the below-provided command:
Then, use the docker search command to search the Ubuntu images:
After executing the above-mentioned command, you will get the list of images with the same name along with the parameters like image name, description, stars, and automated parameters that suggest that you can build the images automatically using the different forums:
You can also filter your search by using the –filter option based on STARS. For instance, we want to search the Ubuntu image which has a minimum of 20 stars with the help of the following command:
To filter the search based on whether the Docker built-in image is being used as automated or with the help of the following command:
Here:
- –filter flag used for retrieving the output which is based on the provided condition.
- ngnix is our desired Docker image with the true value of the automated filter.
As a result, we get the three ngnix images:
That’s it! We have described the usage of the Docker Hub for searching the built-in images.
Conclusion
To search the Docker images by using the Docker Hub registry, first, login to your Docker Hub account, and access the Repositories tab. After that search the desired image in the search bar. Another way to get the built-in images is by executing different commands, such as the “docker search <image-name>”, “docker search –filter=stars=<num> <img-name>” and “docker search –filter=is-automated=true <img-name>” commands. This guide provides the easiest way to search the images by using the Docker hub.