How to search container images in Registries through the docker command

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.

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:

#  search [OPTIONS] TERM 

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

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

1 . Search by name:

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

# docker search nginx 

2 . 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 docker command search Nginx in a different registry. Eg: the fedora project, docker.io, 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  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 

c. –filter is-automated=true/false

This conditional option will show only images, which will be built automatically.

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

About Sachin Gupta

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!

Have any Question or Comment?

Leave a Reply

Your email address will not be published.