YouTip LogoYouTip

Docker Search Command

[![Image 1: Docker Command Manual](#)Docker Command Manual](#) * * * The `docker search` command is used to search for images in Docker Hub or other registries. The `docker search` command helps users find and retrieve desired images and provides functionality to filter and sort the search results. ### Syntax docker search TERM * **`TERM`**: The keyword to search for. Common options: * **--automated:** Lists only automated build type images. * **--no-trunc:** Shows the full image description. * **-f :** Lists images with a star count not less than the specified value. **1. Search for an image** docker search ubuntu This searches Docker Hub for images containing the keyword "ubuntu". **2. Limit the number of search results returned** docker search --limit 5 ubuntu This searches Docker Hub for images containing the keyword "ubuntu" and returns only the first 5 results. **3. Filter search results** docker search --filter stars=50 ubuntu This searches Docker Hub for images containing the keyword "ubuntu" and returns only images with a star count of 50 or higher. **4. Do not truncate output** docker search --no-trunc ubuntu This searches Docker Hub for images containing the keyword "ubuntu" and displays the full image description. **5. Custom format output** docker search --format "{{.Name}}: {{.StarCount}} stars" ubuntu This searches Docker Hub for images containing the keyword "ubuntu" and displays the image name and star count in the specified format. ### Examples 1. Search for Ubuntu images docker search ubuntu Output example: NAME DESCRIPTION STARS OFFICIAL AUTOMATED ubuntu Ubuntu is a Debian-based Linux operating sys… 10000 dorowu/ubuntu-desktop-lxde-vnc Ubuntu with openssh-server and NoVNC 4000 rastasheep/ubuntu-sshd Dockerized SSH service, built on top of offi… 2000 Parameter description: **NAME:** The name of the image repository source. **DESCRIPTION:** The description of the image. **OFFICIAL:** Whether it is an official Docker release. **stars:** Similar to stars on Github, indicating likes or favorites. **AUTOMATED:** Automated build. 2. Limit the number of results returned docker search --limit 3 ubuntu Output example: NAME DESCRIPTION STARS OFFICIAL AUTOMATED ubuntu Ubuntu is a Debian-based Linux operating sys… 10000 dorowu/ubuntu-desktop-lxde-vnc Ubuntu with openssh-server and NoVNC 4000 rastasheep/ubuntu-sshd Dockerized SSH service, built on top of offi… 2000 3. Filter search results docker search --filter stars=1000 ubuntu Output example: NAME DESCRIPTION STARS OFFICIAL AUTOMATED ubuntu Ubuntu is a Debian-based Linux operating sys… 10000 dorowu/ubuntu-desktop-lxde-vnc Ubuntu with openssh-server and NoVNC 4000 rastasheep/ubuntu-sshd Dockerized SSH service, built on top of offi… 2000 ### 4. Custom format output docker search --format "{{.Name}}: {{.StarCount}} stars" ubuntu Output example: ubuntu: 10000 stars dorowu/ubuntu-desktop-lxde-vnc: 4000 stars rastasheep/ubuntu-sshd: 2000 stars ### Notes * Search results may contain a large number of images. You can use filtering and sorting options to narrow down the results. * Ensure you use accurate keywords to get relevant results. * `docker search` searches Docker Hub by default. To search other registries, you need to configure the Docker client accordingly. The `docker search` command is an essential tool for finding Docker images. By specifying keywords and options, users can efficiently search for and retrieve desired images in Docker registries. This command is applicable to various scenarios, including finding images with specific functionalities, obtaining highly-rated images, and customizing the display of results. * * Docker Command Manual](#)
← Docker Images CommandDocker Pull Command β†’