首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >docker清单平台变体的有效值是什么

docker清单平台变体的有效值是什么
EN

Stack Overflow用户
提问于 2019-04-27 23:50:52
回答 1查看 96关注 0票数 1

https://docs.docker.com/registry/spec/manifest-v2-2/的模式规范并没有这么说。

架构列表可以在https://github.com/docker-library/official-images#architectures-other-than-amd64的docker repos中找到。然而,查看一些流行的图像会显示不同的输出,例如

代码语言:javascript
复制
docker manifest inspect alpine
...
  {
     "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
     "size": 528,
     "digest": "sha256:c4ba6347b0e4258ce6a6de2401619316f982b7bcc529f73d2a410d0097730204",
     "platform": {
        "architecture": "arm",
        "os": "linux",
        "variant": "v6"
     }
  },
  {
     "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
     "size": 528,
     "digest": "sha256:7b7521cf1e23b0e1756c68a946b255d0619266767b7d62bf7fe7c8618e0a9a17",
     "platform": {
        "architecture": "arm",
        "os": "linux",
        "variant": "v7"
     }
  },
...

那么,指定ARM架构等平台变体的正确方法是什么?

EN

回答 1

Stack Overflow用户

发布于 2019-05-14 01:31:47

似乎至少可以通过查看https://github.com/docker/cli/blob/1f6a1a438c4ae426e446f17848114e58072af2bb/cli/command/manifest/util.go上的docker cli源代码来部分回答这个问题。以下是操作系统/体系结构选项列表,但不是体系结构变体:

代码语言:javascript
复制
var validOSArches = map[osArch]bool{
    {os: "darwin", arch: "386"}:      true,
    {os: "darwin", arch: "amd64"}:    true,
    {os: "darwin", arch: "arm"}:      true,
    {os: "darwin", arch: "arm64"}:    true,
    {os: "dragonfly", arch: "amd64"}: true,
    {os: "freebsd", arch: "386"}:     true,
    {os: "freebsd", arch: "amd64"}:   true,
    {os: "freebsd", arch: "arm"}:     true,
    {os: "linux", arch: "386"}:       true,
    {os: "linux", arch: "amd64"}:     true,
    {os: "linux", arch: "arm"}:       true,
    {os: "linux", arch: "arm64"}:     true,
    {os: "linux", arch: "ppc64le"}:   true,
    {os: "linux", arch: "mips64"}:    true,
    {os: "linux", arch: "mips64le"}:  true,
    {os: "linux", arch: "s390x"}:     true,
    {os: "netbsd", arch: "386"}:      true,
    {os: "netbsd", arch: "amd64"}:    true,
    {os: "netbsd", arch: "arm"}:      true,
    {os: "openbsd", arch: "386"}:     true,
    {os: "openbsd", arch: "amd64"}:   true,
    {os: "openbsd", arch: "arm"}:     true,
    {os: "plan9", arch: "386"}:       true,
    {os: "plan9", arch: "amd64"}:     true,
    {os: "solaris", arch: "amd64"}:   true,
    {os: "windows", arch: "386"}:     true,
    {os: "windows", arch: "amd64"}:   true,
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55882264

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档