Docker, a popular containerization platform, provides a powerful command-line interface for managing containers and images. Container images are generally stored in image registries. Distribute through public or private users. Image registries share container images to download. You can configure registries for search.

Registries are repositories that store images, making them accessible for deployment
In different environments. Docker Hub is one of the most popular and mostly used public registries,
It has a huge collection of pre-built container images.

One essential aspect of working is the ability to search for container images in registries. In this topic, I am going to check the search command, which finds images in different image registries and filters through image name, user name, or according and the rating stars.

The syntax for the search command is shown below:

# docker search [OPTIONS] TERM 

container search will search in the docker hub or container registries, which you configured in the registries configuration file.

Below search commands will use some useful for the search subcommand:

1 . Docker Search by container name:

Below commands will search images with a name containing ‘Nginx’. I am showing examples with Nginx container name. You can modify it according to you.

# docker search nginx 

2 . Docker Limit Search

This option will search or list images per registry. For example, if we have a number of registries available then a limited number of images will show per registry. –limit option will show results according to the given limit per registry.

# docker search --limit=<number> container_name

The below result shows the command search Nginx container in a different registry. Eg: the fedora project, dockerio, etc. It is limited to two projects.

3. –filter option –filter <filter=value>

this will filter output based on sub-option command filters :

a . –filter stars

This will filter container registery according to stars which has. 
# docker search --filter stars=4 nginx

b. –filter is-official

This condition will show only those images that are official images.

# docker search --filter is-official=true nginx 
docker images

c. –filter is-automated=true/false

 # docker search --filter is-automated=true nginx 
automate docker built

Searching for container images in Docker registries is an important step in the software development and deployment process. With the Docker command-line interface, users can quickly search, evaluate, and retrieve images from both public and private registries. By taking advantage of the Docker search command and its various options, developers can streamline the process of finding the right container images for their projects. Here is another topic for Setup & Configure Mysql Container, click here.

By Sachin G

I am a professional freelance contributor and founder of tech transit. Love to write and lover of education, culture, and community. I have been using it, setting, supporting, and maintaining it since 2009.Linux rocks! Sachin G Follow me on LinkedIn and x formerly twitter