如果你还想从头学起 Docker,可以看看这个系列的文章哦!
https://www.cnblogs.com/poloyy/category/1870863.html
作用
从 Docker Hub 查找镜像
语法格式
docker search [OPTIONS] TERM
options 说明
option | 作用 |
-f,--filter filter | 根据提供的 filter 过滤输出 |
--limit int | 搜索结果条数最大为 int(默认25) |
--no-trunc | 显示完整的镜像 description |
--format |
使用 Go 模板进行美观打印 |
简单栗子
--filter 栗子
stars 的栗子
搜索 star 数量>3 的 busybox 镜像并打印详细描述
docker search --filter=stars=3 --no-trunc busybox NAME DESCRIPTION STARS OFFICIAL AUTOMATED busybox Busybox base image. 2272 [OK] progrium/busybox 70 [OK] radial/busyboxplus Full-chain,Internet enabled,busybox made from scratch. Comes in git and cURL flavors. 40 [OK] yauritux/busybox-curl Busybox with CURL 16 arm32v7/busybox Busybox base image. 9 armhf/busybox Busybox base image. 6 odise/busybox-curl 4 [OK] arm64v8/busybox Busybox base image.
搜索 star 数量>3000 的 mysql 镜像
docker search mysql --filter=STARS=3000 NAME DESCRIPTION STARS OFFICIAL AUTOMATED mysql MySQL is a widely used,open-source relation… 11063 [OK] mariadb MariaDB Server is a high performing open sou… 4193 [OK]
is-automated 的栗子
搜索自动构建的 busybox 镜像
docker search --filter is-automated=true busybox NAME DESCRIPTION STARS OFFICIAL AUTOMATED progrium/busybox [OK] radial/busyboxplus Full-chain,busybox made f… [OK] odise/busybox-curl [OK] odise/busybox-python [OK] prom/busybox Prometheus Busybox Docker base images 2 [OK] ggtools/busybox-ubuntu Busybox ubuntu version with extra goodies 0 [OK]
能看到 AUTOMATED 都是 OK
is-official 的栗子
搜索 star 数量>3 且是官方版本的 busybox 镜像
docker search --filter is-official=true --filter stars=3 busybox NAME DESCRIPTION STARS OFFICIAL AUTOMATED busybox Busybox base image. 2272 [OK]
能看到 OFFICIAL 是 OK
原文地址:https://www.cnblogs.com/poloyy
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。