1. docker manifest

docker manifest 命令使用子命令来管理镜像和多架构镜像(manifest lists)。

在理解多该命令前,需要先理解两个概念:

  • manifest: 也可以称为 MANIFEST单个 manifest普通镜像 是关于镜像的信息,例如 overylay 层、大小和摘要。

  • manifest lists: 也可以称为 MANIFEST_LISTS多 manifest多架构镜像,是通过指定一个或多个(理想情况下不止一个)镜像名称创建的镜像层列表。然后,它可以像 docker pulldocker run 命令中的映像名称一样使用。理想情况下,manifest list 是由不同的 CPU 架构 和 OS 操作系统组合的功能相同的镜像创建的。因此,manifest lists 通常被称为 “多架构镜像”。

一个多架构镜像(manifest lists) 允许某个服务镜像使用一个名称关联多个不同架构功能相同的镜像。即一个镜像 tag 中可以同时包含,ARMv7/ARMv8/i386/AMD64/MacOS/Windows 等等不同平台运行依赖的 overlay 层等信息,在 docker pull 时会默认会自动下载当前机器依赖的镜像层运行,给多平台架构镜像的管理带来了很大的便利。

docker manifest 命令本身不执行任何操作。为了对 manifest 或 manifest list 进行操作,必须使用其中一个子命令。 该命令还可以为用户查看普通镜像提供额外的信息,比如构建映像的操作系统和架构。

一定要记住,本地存储的 manifest lists 永远不会被 docker 的引擎使用。

1.1. 使用不安全的 Registries

manifest 命令仅与 Docker 仓库交互。因此,它无法查询引擎以获取允许的不安全仓库列表。为了允许 CLI 与不安全的仓库进行交互,某些 docker manifest 命令带有一个 --insecure 标志。例如对于每个 create 查询注册表的事务,--insecure 必须指定标志。此标志告诉 CLI,此注册表调用可能会忽略安全性问题,例如丢失或自签名证书。同样,在 manifest 推到不安全的仓库上的时候,--insecure 必须指定该标志。如果未与不安全的仓库一起使用,清单命令将找不到符合默认要求的仓库。

--insecure 标志不需要对清单列表进行注释 annotate ,因为 annotate 是对清单列表的本地存储副本进行的。如果你正在对本地存储的清单列表执行 docker 清单检查,你也可以跳过 --insecure 标志。

1.2. 实验特性功能

EXPERIMENTAL: docker manifest is an experimental feature. Experimental features provide early access to product functionality. These features may change between releases without warning, or can be removed from a future release. Learn more about experimental features in our documentation: https://docs.docker.com/go/experimental/

1.3. 帮助

# docker manifest --help

Usage:  docker manifest COMMAND

The **docker manifest** command has subcommands for managing image manifests and
manifest lists. A manifest list allows you to use one name to refer to the same image
built for multiple architectures.

To see help for a subcommand, use:

    docker manifest CMD --help

For full details on using docker manifest lists, see the registry v2 specification.

EXPERIMENTAL:
  docker manifest is an experimental feature.
  Experimental features provide early access to product functionality. These
  features may change between releases without warning, or can be removed from a
  future release. Learn more about experimental features in our documentation:
  https://docs.docker.com/go/experimental/

Commands:
  annotate    Add additional information to a local image manifest
  create      Create a local manifest list for annotating and pushing to a registry
  inspect     Display an image manifest, or manifest list
  push        Push a manifest list to a repository
  rm          Delete one or more manifest lists from local storage

1.4. 参考

Copyright © 温玉 2021 | 浙ICP备2020032454号 all right reserved,powered by Gitbook该文件修订时间: 2022-03-18 02:21:19

results matching ""

    No results matching ""