Docker 17参考手册
引擎: CLI | Engine: CLI
docker search
描述
在 Docker Hub 搜索图像
使用
docker search [OPTIONS] TERM
备选方案
Name, shorthand |
Default |
Description |
---|---|---|
--automated |
false |
Only show automated builds |
--filter, -f |
|
Filter output based on conditions provided |
--limit |
25 |
Max number of search results |
--no-trunc |
false |
Don’t truncate output |
--stars, -s |
0 |
Only displays with at least x stars |
父类命令
Command |
Description |
---|---|
docker |
The base command for the Docker CLI. |
扩展描述
搜索 Docker Hub 图像
见从码头枢纽找公众形象有关从命令行查找共享图像的详细信息。
注*搜索查询最多返回25个结果。
实例
按名称搜索图像
此示例显示名称中包含 “busybox” 的图像:
$ docker search busybox
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
busybox Busybox base image. 316 [OK]
progrium/busybox 50 [OK]
radial/busyboxplus Full-chain, Internet enabled, busybox made... 8 [OK]
odise/busybox-python 2 [OK]
azukiapp/busybox This image is meant to be used as the base... 2 [OK]
ofayau/busybox-jvm Prepare busybox to install a 32 bits JVM. 1 [OK]
shingonoide/archlinux-busybox Arch Linux, a lightweight and flexible Lin... 1 [OK]
odise/busybox-curl 1 [OK]
ofayau/busybox-libc32 Busybox with 32 bits (and 64 bits) libs 1 [OK]
peelsky/zulu-openjdk-busybox 1 [OK]
skomma/busybox-data Docker image suitable for data volume cont... 1 [OK]
elektritter/busybox-teamspeak Lightweight teamspeak3 container based on... 1 [OK]
socketplane/busybox 1 [OK]
oveits/docker-nginx-busybox This is a tiny NginX docker image based on... 0 [OK]
ggtools/busybox-ubuntu Busybox ubuntu version with extra goodies 0 [OK]
nikfoundas/busybox-confd Minimal busybox based distribution of confd 0 [OK]
openshift/busybox-http-app 0 [OK]
jllopis/busybox 0 [OK]
swyckoff/busybox 0 [OK]
powellquiring/busybox 0 [OK]
williamyeh/busybox-sh Docker image for BusyBox's sh 0 [OK]
simplexsys/busybox-cli-powered Docker busybox images, with a few often us... 0 [OK]
fhisamoto/busybox-java Busybox java 0 [OK]
scottabernethy/busybox 0 [OK]
marclop/busybox-solr
显示非截断描述(-no-trunc)
此示例显示名称中包含 'busybox' 的图像,至少3星,并且说明在输出中不会被截断:
$ docker search --stars=3 --no-trunc busybox
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
busybox Busybox base image. 325 [OK]
progrium/busybox 50 [OK]
radial/busyboxplus Full-chain, Internet enabled, busybox made from scratch. Comes in git and cURL flavors. 8 [OK]
限制搜索结果( - 限制)
标志--limit
是搜索结果返回的最大数量。该值可以在1到100之间的范围内。--limit
默认值为25。
过滤
过滤标志(-f
或--filter
)格式是一key=value
对。如果有多个过滤器,则传递多个标志(例如--filter "foo=bar" --filter "bif=baz"
)
目前支持的过滤器是:
- star(int - 图像中星星的数量)
- is-automated(布尔 - 真或假) - 图像是否是自动的
- is-official(布尔值 - true 或 false) - 图像是否为官方
stars
此示例显示名称中包含 'busybox' 且至少3星的图像:
$ docker search --filter stars=3 busybox
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
busybox Busybox base image. 325 [OK]
progrium/busybox 50 [OK]
radial/busyboxplus Full-chain, Internet enabled, busybox made... 8 [OK]
is-automated
此示例显示名称中包含 “busybox” 的图像,并且是自动生成的:
$ docker search --filter is-automated busybox
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
progrium/busybox 50 [OK]
radial/busyboxplus Full-chain, Internet enabled, busybox made... 8 [OK]
is-official
这个例子显示的图像名称包含 'busybox',至少3星,并且是官方版本:
$ docker search --filter "is-official=true" --filter "stars=3" busybox
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
progrium/busybox 50 [OK]
radial/busyboxplus Full-chain, Internet enabled, busybox made... 8 [OK]
引擎: CLI | Engine: CLI相关
Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口。
主页 | https://docker.com/ |
源码 | https://github.com/docker/docker |
版本 | 17 |
发布版本 | 17.06 |