iis服务器助手广告广告
返回顶部
首页 > 资讯 > 精选 >docker search命令如何使用
  • 246
分享到

docker search命令如何使用

2023-07-05 03:07:10 246人浏览 泡泡鱼
摘要

本文小编为大家详细介绍“Docker search命令如何使用”,内容详细,步骤清晰,细节处理妥当,希望这篇“docker search命令如何使用”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧

本文小编为大家详细介绍“Docker search命令如何使用”,内容详细,步骤清晰,细节处理妥当,希望这篇“docker search命令如何使用”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧。

一、docker search 命令选项

命令选项描述
–filter , -f根据给定的条件进行过滤
–fORMat自定义打印格式
–limit显示搜索结果,默认值25
–no-trunc回显结果不进行截断,全部显示

二、docker search 使用实例

2.1 通过指定镜像名搜索

[root@redrose2100 ~]# docker search busyboxNAME                                DESCRIPTioN                                     STARS     OFFICIAL   AUTOMATEDbusybox                             Busybox base image.                             2754      [OK]radial/busyboxplus                  Full-chain, Internet enabled, busybox made f…   49                   [OK]yauritux/busybox-curl               Busybox with CURL                               18arm32v7/busybox                     Busybox base image.                             10arm64v8/busybox                     Busybox base image.                             4odise/busybox-curl                                                                  4                    [OK]i386/busybox                        Busybox base image.                             3p7ppc64/busybox                     Busybox base image for ppc64.                   2s390x/busybox                       Busybox base image.                             2prom/busybox                        prometheus Busybox Docker base images           2                    [OK]busybox42/zimbra-docker-Centos      A Zimbra Docker image, based in ZCS 8.8.9 an…   2                    [OK]joeshaw/busybox-nonroot             Busybox container with non-root user nobody     2vukomir/busybox                     busybox and curl                                1spotify/busybox                     Spotify fork of https://hub.docker.com/_/bus…   1busybox42/haraka-docker-centos      CentOS Haraka build with spamassassin, redis…   1                    [OK]ppc64le/busybox                     Busybox base image.                             1amd64/busybox                       Busybox base image.                             1busybox42/Nginx_PHP-docker-centos   This is a nginx/php-fpm server running on Ce…   1                    [OK]ibmcom/busybox-ppc64le                                                              0busybox42/alpine-pod                                                                0antrea/busybox                                                                      0openebs/busybox-client                                                              0ibmcom/busybox                                                                      0rancher/busybox                                                                     0ibmcom/busybox-amd64                                                                0[root@redrose2100 ~]#

2.2 搜索结果不进行截断显示

[root@redrose2100 ~]# docker search busybox --no-truncNAME                                DESCRIPTION                                                                                 STARS     OFFICIAL   AUTOMATEDbusybox                             Busybox base image.                                                                         2754      [OK]radial/busyboxplus                  Full-chain, Internet enabled, busybox made from scratch. Comes in git and cURL flavors.     49                   [OK]yauritux/busybox-curl               Busybox with CURL                                                                           18arm32v7/busybox                     Busybox base image.                                                                         10odise/busybox-curl                                                                                                              4                    [OK]arm64v8/busybox                     Busybox base image.                                                                         4i386/busybox                        Busybox base image.                                                                         3p7ppc64/busybox                     Busybox base image for ppc64.                                                               2s390x/busybox                       Busybox base image.                                                                         2prom/busybox                        Prometheus Busybox Docker base images                                                       2                    [OK]busybox42/zimbra-docker-centos      A Zimbra Docker image, based in ZCS 8.8.9 and CentOS 7.                                     2                    [OK]joeshaw/busybox-nonroot             Busybox container with non-root user nobody                                                 2vukomir/busybox                     busybox and curl                                                                            1spotify/busybox                     Spotify fork of Https://hub.docker.com/_/busybox/ for testing heliOS.                       1busybox42/haraka-docker-centos      CentOS Haraka build with spamassassin, Redis and some other things.  Experimental still..   1                    [OK]ppc64le/busybox                     Busybox base image.                                                                         1amd64/busybox                       Busybox base image.                                                                         1busybox42/nginx_php-docker-centos   This is a nginx/php-fpm server running on CentOS 7.                                         1                    [OK]ibmcom/busybox-ppc64le                                                                                                          0antrea/busybox                                                                                                                  0busybox42/alpine-pod                                                                                                            0openebs/busybox-client                                                                                                          0ibmcom/busybox                                                                                                                  0rancher/busybox                                                                                                                 0ibmcom/busybox-amd64                                                                                                            0[root@redrose2100 ~]#

2.3 设置搜索结果只显示10个

[root@redrose2100 ~]# docker search busybox --limit=10NAME                     DESCRIPTION                                     STARS     OFFICIAL   AUTOMATEDbusybox                  Busybox base image.                             2754      [OK]radial/busyboxplus       Full-chain, Internet enabled, busybox made f…   49                   [OK]yauritux/busybox-curl    Busybox with CURL                               18vukomir/busybox          busybox and curl                                1antrea/busybox                                                           0ibmcom/busybox-amd64                                                     0ibmcom/busybox-ppc64le                                                   0rancher/busybox                                                          0ibmcom/busybox                                                           0openebs/busybox-client                                                   0[root@redrose2100 ~]#

2.4 搜索结果过滤star收藏数量大于等于3个

[root@redrose2100 ~]# docker search busybox --filter stars=3NAME                    DESCRIPTION                                     STARS     OFFICIAL   AUTOMATEDbusybox                 Busybox base image.                             2754      [OK]radial/busyboxplus      Full-chain, Internet enabled, busybox made f…   49                   [OK]yauritux/busybox-curl   Busybox with CURL                               18arm32v7/busybox         Busybox base image.                             10odise/busybox-curl                                                      4                    [OK]arm64v8/busybox         Busybox base image.                             4i386/busybox            Busybox base image.                             3[root@redrose2100 ~]#

2.5 搜索结果只列出自动构建的镜像

[root@redrose2100 ~]# docker search busybox --filter is-automated=trueNAME                                DESCRIPTION                                     STARS     OFFICIAL   AUTOMATEDradial/busyboxplus                  Full-chain, Internet enabled, busybox made f…   49                   [OK]odise/busybox-curl                                                                  4                    [OK]busybox42/zimbra-docker-centos      A Zimbra Docker image, based in ZCS 8.8.9 an…   2                    [OK]prom/busybox                        Prometheus Busybox Docker base images           2                    [OK]busybox42/haraka-docker-centos      CentOS Haraka build with spamassassin, redis…   1                    [OK]busybox42/nginx_php-docker-centos   This is a nginx/php-fpm server running on Ce…   1                    [OK][root@redrose2100 ~]#

2.6 搜索结果只列出官方镜像

[root@redrose2100 ~]# docker search busybox --filter is-official=trueNAME      DESCRIPTION           STARS     OFFICIAL   AUTOMATEDbusybox   Busybox base image.   2754      [OK][root@redrose2100 ~]#

2.7 搜索结果通过多个条件过滤

如下为过滤自动构建的并且收藏数量大于等于3的镜像

[root@redrose2100 ~]# docker search busybox --filter is-automated=true --filter stars=3NAME                 DESCRIPTION                                     STARS     OFFICIAL   AUTOMATEDradial/busyboxplus   Full-chain, Internet enabled, busybox made f…   49                   [OK]odise/busybox-curl                                                   4                    [OK][root@redrose2100 ~]#

2.8 定制自定义打印输出格式

docker search 可以通过 --format 参数定制自定义打印格式,可自定义的占位字段如下:

占位符描述
.Name镜像名称
.Description镜像描述
.StarCount镜像被收藏数量
.IsOfficial镜像是否为官方镜像,如果是现实“OK”
.IsAutomated镜像是否为自动构建,如果是显示“OK”

如下为搜索nginx镜像,只显示镜像名称和镜像被收藏数量

[root@redrose2100 ~]# docker search --format "{{.Name}}: {{.StarCount}}" nginxnginx: 17429linuxserver/nginx: 178bitnami/nginx: 140ubuntu/nginx: 61bitnami/nginx-ingress-controller: 20rancher/nginx-ingress-controller: 11WEBdevops/nginx: 10ibmcom/nginx-ingress-controller: 4bitnami/nginx-ldap-auth-daemon: 3rancher/nginx: 2kasmweb/nginx: 2vmware/nginx: 2rancher/nginx-ingress-controller-defaultbackend: 2rapidfort/nginx: 2bitnami/nginx-exporter: 2wallarm/nginx-ingress-controller: 1vmware/nginx-photon: 1bitnami/nginx-intel: 1rapidfort/nginx-ib: 0ibmcom/nginx-ingress-controller-ppc64le: 0rancher/nginx-conf: 0rancher/nginx-ssl: 0continuumio/nginx-ingress-ws: 0rancher/nginx-ingress-controller-amd64: 0ibmcom/nginx-ppc64le: 0[root@redrose2100 ~]#

如下,格式化显示镜像名称、镜像被收藏数量、镜像是否自动构建、镜像是否官方

[root@redrose2100 ~]# docker search --format "table {{.Name}}\t\t{{.StarCount}}\t\t{{.IsAutomated}}\t\t{{.IsOfficial}}" nginxNAME                                                        STARS               AUTOMATED             OFFICIALnginx                                                       17429                                     [OK]linuxserver/nginx                                           178bitnami/nginx                                               140                 [OK]ubuntu/nginx                                                61bitnami/nginx-ingress-controller                            20                  [OK]rancher/nginx-ingress-controller                            11webdevops/nginx                                             10                  [OK]ibmcom/nginx-ingress-controller                             4bitnami/nginx-ldap-auth-daemon                              3rancher/nginx                                               2kasmweb/nginx                                               2vmware/nginx                                                2rancher/nginx-ingress-controller-defaultbackend             2rapidfort/nginx                                             2bitnami/nginx-exporter                                      2wallarm/nginx-ingress-controller                            1vmware/nginx-photon                                         1bitnami/nginx-intel                                         1rapidfort/nginx-ib                                          0rancher/nginx-conf                                          0ibmcom/nginx-ingress-controller-ppc64le                     0rancher/nginx-ssl                                           0continuumio/nginx-ingress-ws                                0rancher/nginx-ingress-controller-amd64                      0ibmcom/nginx-ppc64le                                        0[root@redrose2100 ~]#

读到这里,这篇“docker search命令如何使用”文章已经介绍完毕,想要掌握这篇文章的知识点还需要大家自己动手实践使用过才能领会,如果想了解更多相关内容的文章,欢迎关注编程网精选频道。

--结束END--

本文标题: docker search命令如何使用

本文链接: https://www.lsjlt.com/news/349213.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • docker search命令如何使用
    本文小编为大家详细介绍“docker search命令如何使用”,内容详细,步骤清晰,细节处理妥当,希望这篇“docker search命令如何使用”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧...
    99+
    2023-07-05
  • docker search命令怎么用
    这篇文章主要介绍了docker search命令怎么用,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。docker search这个命令可以帮助你在命令行中方便的搜索 Dock...
    99+
    2023-06-27
  • docker search 命令详解
    【原文链接】docker search 命令详解 文章目录 一、docker search 命令选项二、docker search 使用实例2.1 通过指定镜像名搜索2.2 搜索结果不进行截断显示2.3 设置搜索结果只显示10个2....
    99+
    2023-08-18
    docker linux 服务器
  • Metasploit search命令使用技巧
    Metasploit search命令使用技巧Metasploit提供了大量的模块。当用户希望快速找到针对某漏洞模块时,则可以使用search命令进行搜索。搜索模块时,用户可以指定搜索类型、CVE ID、发布时间等,如s...
    99+
    2023-06-05
  • docker如何安装elastic search
    这篇文章主要介绍“docker如何安装elastic search”,在日常操作中,相信很多人在docker如何安装elastic search问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答...
    99+
    2023-07-02
  • 如何在docker中使用create命令
    这篇文章将为大家详细讲解有关如何在docker中使用create命令,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。创建容器docker create -it -...
    99+
    2023-06-14
  • Docker如何使用build命令创建镜像
    这篇文章给大家分享的是有关Docker如何使用build命令创建镜像的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。使用build命令创建镜像docker build&n...
    99+
    2024-04-02
  • Docker镜像提交命令commit如何使用
    这篇文章主要介绍“Docker镜像提交命令commit如何使用”,在日常操作中,相信很多人在Docker镜像提交命令commit如何使用问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大...
    99+
    2024-04-02
  • Docker如何使用start命令启动容器
    小编给大家分享一下Docker如何使用start命令启动容器,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!使用start命令启动...
    99+
    2024-04-02
  • Docker如何使用attach命令连接容器
    这篇文章给大家分享的是有关Docker如何使用attach命令连接容器的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。使用attach命令连接容器docker attac...
    99+
    2024-04-02
  • 怎么在Docker中使用Docker命令
    这篇文章主要介绍“怎么在Docker中使用Docker命令”,在日常操作中,相信很多人在怎么在Docker中使用Docker命令问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”怎么在Docker中使用Docke...
    99+
    2023-06-15
  • Docker容器镜像相关命令如何使用
    本篇内容介绍了“Docker容器镜像相关命令如何使用”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!一、Docker 介绍Docker 是一个...
    99+
    2023-06-29
  • Docker如何使用exec命令从外部运行容器内的命令
    这篇文章将为大家详细讲解有关Docker如何使用exec命令从外部运行容器内的命令,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。使用exec命令从外部运行容器内的命令do...
    99+
    2024-04-02
  • docker stats命令怎么使用
    `docker stats`命令用于实时查看运行中的容器的资源使用情况。使用方法如下:1. 打开终端或命令行界面。2. 运行以下命令...
    99+
    2023-08-08
    docker stats
  • Docker常用命令怎么使用
    本篇内容主要讲解“Docker常用命令怎么使用”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Docker常用命令怎么使用”吧!什么是 DockerDocker 是开源的应用容器引擎。Docker...
    99+
    2023-06-04
  • javascript中如何使用search()
    这篇文章主要为大家展示了“javascript中如何使用search()”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“javascript中如何使用search...
    99+
    2024-04-02
  • Docker如何使用命令查看inspect详细信息
    这篇文章主要为大家展示了“Docker如何使用命令查看inspect详细信息”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“Docker如何使用命令查看inspe...
    99+
    2024-04-02
  • Docker如何使用history命令查看镜像历史
    小编给大家分享一下Docker如何使用history命令查看镜像历史,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!使用histo...
    99+
    2024-04-02
  • Linux的docker命令怎么使用
    这篇文章主要介绍“Linux的docker命令怎么使用”,在日常操作中,相信很多人在Linux的docker命令怎么使用问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Linux的docker命令怎么使用”的疑...
    99+
    2023-06-28
  • docker system命令集合的使用
    目录docker system df docker system prune docker systemc info (docker info) docker system 目前拥有...
    99+
    2024-04-02
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作