zoukankan      html  css  js  c++  java
  • Docker(8)- docker search 命令详解

    如果你还想从头学起 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                                                         70                   [OK]
    radial/busyboxplus       Full-chain, Internet enabled, busybox made f…   40                   [OK]
    odise/busybox-curl                                                       4                    [OK]
    odise/busybox-python                                                     4                    [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

  • 相关阅读:
    堆表修改内幕
    HBase集群安装
    ZooKeeper群集安装
    CentOS 6+Hadoop 2.6.0分布式集群安装
    Hive中使用Python实现Transform时遇到Broken pipe错误排查
    SQL Server审计功能入门:SQL Server审核 (SQL Server Audit)
    SQL Server审计功能入门:CDC(Change Data Capture)
    SQL Server审计功能入门:更改跟踪(Change Tracking)
    Redis 学习笔记(一) 字符串 SDS
    asp.net mvc core 管道以及拦截器初了解
  • 原文地址:https://www.cnblogs.com/poloyy/p/13922351.html
Copyright © 2011-2022 走看看