【Docker系列】dockermanifest

更新时间:2023-05-12 23:15:07 阅读: 评论:0

【Docker系列】dockermanifest
docker manifest 描述
管理 Docker 映像清单和清单列表
需要连接⽹络,从docker hub上拉取信息,关于manifest信息 打印出来。不连接⽹络会报错。
注意:此命令在 Docker 客户端上是实验性的。
它不应在⽣产环境中使⽤。
我的理解:
docker hub社区的镜像维护,让他⼈直观的了解你构建的镜像。
就是 docker image inspect <image ID> 查看镜像的信息,是否符合你的使⽤,⾥⾯的CPU架构版本,安装程序,依赖库,⽹络等信息。⽤来维护docker hub社区中的镜像信息,让别可以更加直观的了解内容。
使⽤
$ docker manifest COMMAND COMMAND
扩展描述
该命令本⾝不执⾏任何操作。为了对清单或清单列表进⾏操作,必须使⽤其中⼀个⼦命令。docker manifest
单个清单是有关图像的信息,例如图层、⼤⼩和摘要。docker 清单命令还为⽤户提供了其他信息,例如构建映像的 os 和体系结构。
清单列表是通过指定⼀个或多个(理想情况下是多个)图像名称创建的映像层的列表。然后,可以将其⽤作 与 中的映像名称 和 命令相同的⽅式。docker pull docker run
理想情况下,清单列表是从功能相同的图像创建的,⽤于不同的os/arch组合。因此,清单列表通常称为"多架构映像"。但是,⽤户可以创建⼀个指向两个映像的清单列表 - ⼀个⽤于 amd64 上的 Windows,另⼀个⽤于 amd64 上的 darwin。
$ docker manifest
Usage:  docker manifest COMMAND
The **docker manifest** command has subcommands for managing image manifests and manifest lists. A manifest list allows you to u one name to refer to the same image built for multiple architectures.
To e help for a subcommand, u:
docker manifest CMD --help
For full details on using docker manifest lists, e the registry v2 specification.
EXPERIMENTAL:
docker manifest is an experimental feature.樱花的寓意
Experimental features provide early access to product functionality. The
features may change between releas without warning, or can be removed from a
future relea. Learn more about experimental features in our documentation:
/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
Run 'docker manifest COMMAND --help'for more information on a command.
manifest inspect 清单检查
$ docker manifest inspect --help
Usage:  docker manifest inspect [OPTIONS][MANIFEST_LIST] MANIFEST
Display an image manifest, or manifest list
Options:
--incure  Allow communication with an incure registry
-v, --verbo    Output additional info including layers and platform
manifest create 清单创建
$ docker manifest create --help
Usage:  docker manifest create MANIFEST_LIST MANIFEST []
Create a local manifest list for annotating and pushing to a registry
Options:
-a, --amend      Amend an existing manifest list
--incure  Allow communication with an incure registry
manifest annotate 清单注释
$ docker manifest annotate --help
Usage:  docker manifest annotate [OPTIONS] MANIFEST_LIST MANIFEST
Add additional information to a local image manifest
Options:
--arch string          Set architecture
--os string            Set operating system
--os-features strings  Set operating system feature
--os-version string    Set operating system version
--variant string        Set architecture variant
manifest push 清单推送
$ docker manifest push --help
Usage:  docker manifest push [OPTIONS] MANIFEST_LIST
Push a manifest list to a repository
Options:
--incure  Allow push to an incure registry
-p, --purge      Remove the local manifest list after push
使⽤不安全的注册表
manifest 命令仅与 Docker 注册表交互。因此,它⽆法向引擎查询允许的不安全注册表列表。为了允许 CLI 与不安全的注册表交互,⼀些docker manifest 命令有⼀个--incure标志。对于查询注册表的每个事务,例如 create,--incure必须指定标志。此标志告诉 CLI,此注册表调⽤可能会忽略丢失或⾃签名证书等安全问题。同样,在manifest push不安全的注册表上,--incure必须指定标志。如果这不与不安全的注册表⼀起使⽤,则清单命令将⽆法找到满⾜默认要求的注册表。
⽰例
查看镜像清单
查看docker hub 上 hello-world 镜像
$ docker manifest inspect hello-world
{
宝宝低烧怎么办
"schemaVersion":2,
"mediaType":"application/vnd.docker.distribution.manifest.list.v2+json",
"manifests":[
{
"mediaType":"application/vnd.docker.distribution.manifest.v2+json",
"size":525,
"digest":"sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4",
"platform":{
"architecture":"amd64",
"os":"linux"
情人导航
}
},
{
"mediaType":"application/vnd.docker.distribution.manifest.v2+json",
"size":525,
"digest":"sha256:7b8b7289d0536a08eabdf71c20246e23f7116641db7e1d278592236ea4dcb30c",
"platform":{
"architecture":"arm",
"os":"linux",
"variant":"v5"
"digest":"sha256:f130bd2d67e6e9280ac6d0a6c83857bfaf70234e8ef4236876eccfbd30973b1c", "platform":{
火字旁
"architecture":"arm",
"os":"linux",
"variant":"v7"
}
自然手抄报},
{
"mediaType":"application/vnd.docker.distribution.manifest.v2+json",
"size":525,
"digest":"sha256:01433e86a06b752f228e3c17394169a5e21a0995f153268a9b36a16d4f2b2184", "platform":{
"architecture":"arm64",
"os":"linux",
"variant":"v8"
}
},
{
"mediaType":"application/vnd.docker.distribution.manifest.v2+json",
"size":525,
"digest":"sha256:251bb7a536c7cce3437758971aab3a31c6da52fb43ff0654cff5b167c4486409", "platform":{
"architecture":"386",
"os":"linux"
}
},
{
"mediaType":"application/vnd.docker.distribution.manifest.v2+json",
"size":525,
"digest":"sha256:c2f204d26b4ea353651385001bb6bc371d8c4edcd9daf61d00ad365d927e00c0", "platform":{
"architecture":"mips64le",
"os":"linux"
}
},
{
"mediaType":"application/vnd.docker.distribution.manifest.v2+json",
"size":525,
"digest":"sha256:b836bb24a270b9cc935962d8228517fde0f16990e88893d935efcb1b14c0017a", "platform":{
"architecture":"ppc64le",
"os":"linux"
}
},
{
"mediaType":"application/vnd.docker.distribution.manifest.v2+json",
"size":525,
"digest":"sha256:98c9722322be649df94780d3fbe594fce7996234b259f27eac9428b84050c849", "platform":{
"architecture":"riscv64",
"os":"linux"
}
},
{
"mediaType":"application/vnd.docker.distribution.manifest.v2+json",
"size":525,
"digest":"sha256:c7b6944911848ce39b44ed660d95fb54d69bbd531de724c7ce6fc9f743c0b861", "platform":{
"architecture":"s390x",
"os":"linux"
"digest":"sha256:7e9c5b2a36bdd391c713b800eb7ac7047207f04faf92ec4aff8667c85540b41b",
"platform":{
"architecture":"amd64",假装歌词
"os":"windows",
"os.version":"10.0.20348.473"
}
},
{
"mediaType":"application/vnd.docker.distribution.manifest.v2+json",
"size":1125,
"digest":"sha256:b17da88a43678dd8de2c335b977330a5f4e3f1175251a4204f54ef2ed1360709",
"platform":{
"architecture":"amd64",
"os":"windows",
"os.version":"10.0.17763.2458"
}
}
]
}
查看镜像清单,获取os/arch信息
木雕-
-verbo,该参数提供图像的名称(Ref)、体系结构和操作系统(平台)。
$ docker manifest inspect --verbo hello-world
[
{
"Ref":"docker.io/library/hello-world:latest@sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4", "Descriptor":{
"mediaType":"application/vnd.docker.distribution.manifest.v2+json",
"digest":"sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4",
"size":525,
"platform":{
"architecture":"amd64",
"os":"linux"
}
},
"SchemaV2Manifest":{
"schemaVersion":2,
"mediaType":"application/vnd.docker.distribution.manifest.v2+json",农村电视剧大全
"config":{
"mediaType":"application/ainer.image.v1+json",
"size":1469,
"digest":"sha256:feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412"
},
"layers":[
{
"mediaType":"application/vnd.fs.ip",
"size":2479,
"digest":"sha256:2db29710123e3e53a794f2694094b9b4338aa9ee5c40b930cb8063a1be392c54"
}
]
}
},
{
"Ref":"docker.io/library/hello-world:latest@sha256:7b8b7289d0536a08eabdf71c20246e23f7116641d
b7e1d278592236ea4dcb30c", "Descriptor":{
"mediaType":"application/vnd.docker.distribution.manifest.v2+json",
"digest":"sha256:7b8b7289d0536a08eabdf71c20246e23f7116641db7e1d278592236ea4dcb30c",
"size":525,

本文发布于:2023-05-12 23:15:07,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/890043.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:信息   映像   注册表   列表   图像   镜像   标志   名称
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图