zl程序教程

您现在的位置是:首页 >  其他

当前栏目

Docker技术入门与实战(第2版)3.3 搜寻镜像

2023-03-09 22:19:17 时间

3.3 搜寻镜像


使用docker search命令可以搜索远端仓库中共享的镜像,默认搜索官方仓库中的镜像。用法为docker search TERM,支持的参数主要包括:

--automated=true|false:仅显示自动创建的镜像,默认为否;

--no-trunc=true|false:输出信息不截断显示,默认为否;

-s, --stars=X:指定仅显示评价为指定星级以上的镜像,默认为0,即输出所有镜像。

例如,搜索所有自动创建的评价为1+的带nginx关键字的镜像,如下所示:

$ docker search --automated -s 3 nginx

NAME                     DESCRIPTION           STARS     OFFICIAL   AUTOMATED

jwilder/nginx-proxy      Automated Nginx reverse proxy for docker c...  670  [OK]

richarvey/nginx-php-fpm  Container running Nginx + PHP-FPM capable ...  206  [OK]

million12/nginx-php      Nginx + PHP-FPM 5.5, 5.6, 7.0 (NG), CentOS...   67  [OK]

maxexcloo/nginx-php      Docker framework container with Nginx and ...   57  [OK]

webdevops/php-nginx      Nginx with PHP-FPM                              38  [OK]

h3nrik/nginx-ldap        NGINX web server with LDAP/AD, SSL and pro...   27  [OK]

bitnami/nginx            Bitnami nginx Docker Image                      18  [OK]

maxexcloo/nginx          Docker framework container with Nginx inst...   7   [OK]

million12/nginx          Nginx: extensible, nicely tuned for better...   4   [OK]

webdevops/nginx          Nginx container                                 3   [OK]

ixbox/nginx              Nginx on Alpine Linux.                          3   [OK]

evild/alpine-nginx       Minimalistic Docker image with Nginx            3   [OK]

可以看到返回了很多包含关键字的镜像,其中包括镜像名字、描述、星级(表示该镜像的受欢迎程度)、是否官方创建、是否自动创建等。

默认的输出结果将按照星级评价进行排序。