欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

docker search命令的具體使用

 更新時間:2023年02月13日 17:04:36   作者:redrose2100  
本文主要介紹了docker search命令的具體使用,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧

一、docker search 命令選項

命令選項描述
–filter , -f根據(jù)給定的條件進行過濾
–format自定義打印格式
–limit顯示搜索結(jié)果,默認值25
–no-trunc回顯結(jié)果不進行截斷,全部顯示

二、docker search 使用實例

2.1 通過指定鏡像名搜索

[root@redrose2100 ~]# docker search busybox
NAME                                DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
busybox                             Busybox base image.                             2754      [OK]
radial/busyboxplus                  Full-chain, Internet enabled, busybox made f…   49                   [OK]
yauritux/busybox-curl               Busybox with CURL                               18
arm32v7/busybox                     Busybox base image.                             10
arm64v8/busybox                     Busybox base image.                             4
odise/busybox-curl                                                                  4                    [OK]
i386/busybox                        Busybox base image.                             3
p7ppc64/busybox                     Busybox base image for ppc64.                   2
s390x/busybox                       Busybox base image.                             2
prom/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     2
vukomir/busybox                     busybox and curl                                1
spotify/busybox                     Spotify fork of https://hub.docker.com/_/bus…   1
busybox42/haraka-docker-centos      CentOS Haraka build with spamassassin, redis…   1                    [OK]
ppc64le/busybox                     Busybox base image.                             1
amd64/busybox                       Busybox base image.                             1
busybox42/nginx_php-docker-centos   This is a nginx/php-fpm server running on Ce…   1                    [OK]
ibmcom/busybox-ppc64le                                                              0
busybox42/alpine-pod                                                                0
antrea/busybox                                                                      0
openebs/busybox-client                                                              0
ibmcom/busybox                                                                      0
rancher/busybox                                                                     0
ibmcom/busybox-amd64                                                                0
[root@redrose2100 ~]#

2.2 搜索結(jié)果不進行截斷顯示

[root@redrose2100 ~]# docker search busybox --no-trunc
NAME                                DESCRIPTION                                                                                 STARS     OFFICIAL   AUTOMATED
busybox                             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                                                                           18
arm32v7/busybox                     Busybox base image.                                                                         10
odise/busybox-curl                                                                                                              4                    [OK]
arm64v8/busybox                     Busybox base image.                                                                         4
i386/busybox                        Busybox base image.                                                                         3
p7ppc64/busybox                     Busybox base image for ppc64.                                                               2
s390x/busybox                       Busybox base image.                                                                         2
prom/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                                                 2
vukomir/busybox                     busybox and curl                                                                            1
spotify/busybox                     Spotify fork of https://hub.docker.com/_/busybox/ for testing helios.                       1
busybox42/haraka-docker-centos      CentOS Haraka build with spamassassin, redis and some other things.  Experimental still..   1                    [OK]
ppc64le/busybox                     Busybox base image.                                                                         1
amd64/busybox                       Busybox base image.                                                                         1
busybox42/nginx_php-docker-centos   This is a nginx/php-fpm server running on CentOS 7.                                         1                    [OK]
ibmcom/busybox-ppc64le                                                                                                          0
antrea/busybox                                                                                                                  0
busybox42/alpine-pod                                                                                                            0
openebs/busybox-client                                                                                                          0
ibmcom/busybox                                                                                                                  0
rancher/busybox                                                                                                                 0
ibmcom/busybox-amd64                                                                                                            0
[root@redrose2100 ~]#

2.3 設(shè)置搜索結(jié)果只顯示10個

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

2.4 搜索結(jié)果過濾star收藏數(shù)量大于等于3個

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

2.5 搜索結(jié)果只列出自動構(gòu)建的鏡像

[root@redrose2100 ~]# docker search busybox --filter is-automated=true
NAME                                DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
radial/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 搜索結(jié)果只列出官方鏡像

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

2.7 搜索結(jié)果通過多個條件過濾

如下為過濾自動構(gòu)建的并且收藏數(shù)量大于等于3的鏡像

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

2.8 定制自定義打印輸出格式

docker search 可以通過 --format 參數(shù)定制自定義打印格式,可自定義的占位字段如下:

占位符描述
.Name鏡像名稱
.Description鏡像描述
.StarCount鏡像被收藏數(shù)量
.IsOfficial鏡像是否為官方鏡像,如果是現(xiàn)實“OK”
.IsAutomated鏡像是否為自動構(gòu)建,如果是顯示“OK”

如下為搜索nginx鏡像,只顯示鏡像名稱和鏡像被收藏數(shù)量

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

如下,格式化顯示鏡像名稱、鏡像被收藏數(shù)量、鏡像是否自動構(gòu)建、鏡像是否官方

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

到此這篇關(guān)于docker search命令的具體使用的文章就介紹到這了,更多相關(guān)docker search命令內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • 詳解java項目打包docker鏡像的幾種方式

    詳解java項目打包docker鏡像的幾種方式

    本文主要介紹了詳解java項目打包docker鏡像的幾種方式,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2023-01-01
  • 詳解Docker目錄掛載的方法總結(jié)

    詳解Docker目錄掛載的方法總結(jié)

    本篇文章主要介紹了Docker目錄掛載的總結(jié),現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2016-11-11
  • Docker學(xué)習(xí)筆記之Weave實現(xiàn)跨主機容器互聯(lián)

    Docker學(xué)習(xí)筆記之Weave實現(xiàn)跨主機容器互聯(lián)

    這篇文章主要介紹了Docker學(xué)習(xí)筆記之Weave實現(xiàn)跨主機容器互聯(lián),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2018-04-04
  • Docker下Tomcat容器中使用Mysql的方法

    Docker下Tomcat容器中使用Mysql的方法

    這篇文章主要介紹了Docker下Tomcat容器中使用Mysql的方法,需要的朋友可以參考下
    2018-07-07
  • docker配置靜態(tài)ip的實現(xiàn)示例

    docker配置靜態(tài)ip的實現(xiàn)示例

    如果不配置會docker會自動分配ip地址給容器,但是每次重啟后ip地址會改變,本文主要介紹了docker配置靜態(tài)ip的實現(xiàn)示例,具有一定的參考價值,感興趣的可以了解一下
    2023-12-12
  • Docker build命令使用小結(jié)

    Docker build命令使用小結(jié)

    本文主要介紹了Docker build命令使用小結(jié),主要用于使用Dockerfile創(chuàng)建鏡像,它會根據(jù)用戶提供的Dockerfile文件,在本地構(gòu)建出一個新的鏡像,感興趣的可以了解一下
    2023-12-12
  • 詳解Docker私有倉庫Registry的搭建驗證

    詳解Docker私有倉庫Registry的搭建驗證

    這篇文章主要介紹了詳解Docker私有倉庫Registry的搭建驗證,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-05-05
  • Docker如何搭建私有鏡像倉庫

    Docker如何搭建私有鏡像倉庫

    這篇文章主要介紹了Docker如何搭建私有鏡像倉庫問題,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2024-08-08
  • IDEA直接打包Docker鏡像的實現(xiàn)

    IDEA直接打包Docker鏡像的實現(xiàn)

    Docker提供了多種方法來打包鏡像,本文主要介紹了IDEA直接打包Docker鏡像的實現(xiàn),具有一定的參考價值,感興趣的可以了解一下
    2024-06-06
  • docker容器重啟錯誤的解決方案

    docker容器重啟錯誤的解決方案

    本文主要介紹了docker容器重啟錯誤的解決方案,詳細的介紹了docker 重啟錯誤的原因及其解決方法,具有一定的參考價值,感興趣的可以了解一下
    2024-07-07

最新評論