Docker命令-search

命令

docker search

描述

Search the Docker Hub for images
从DockerHub中搜索镜像

用法

1
docker search [OPTIONS] TERM

选项

1
2
3
4
5
6
7
8
9
10
11
12
Options:
--filter , -f Filter output based on conditions provided
--format Pretty-print search using a Go template
--limit Max number of search results
--no-trunc Don't truncate output

--format
.Name Image Name
.Description Image description
.StarCount Number of stars for the image
.IsOfficial “OK” if image is official
.IsAutomated “OK” if image build was automated

注意

示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$ docker search --filter stars=25 ubuntu
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
ubuntu Ubuntu is a Debian-based Linux operating sys… 13895 [OK]
websphere-liberty WebSphere Liberty multi-architecture images … 283 [OK]
ubuntu-upstart DEPRECATED, as is Upstart (find other proces… 112 [OK]
neurodebian NeuroDebian provides neuroscience research s… 88 [OK]
open-liberty Open Liberty multi-architecture images based… 51 [OK]
ubuntu-debootstrap DEPRECATED; use "ubuntu" instead 45 [OK]
ubuntu/nginx Nginx, a high-performance reverse proxy & we… 35
ubuntu/mysql MySQL open source fast, stable, multi-thread… 25

$ docker search --filter is-official=true --filter stars=3 busybox
$ docker search --format "{{.Name}}: {{.StarCount}}" nginx
$ docker search --format "table {{.Name}}\t{{.IsAutomated}}\t{{.IsOfficial}}" nginx