ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

如何使用docker desktop 下载x86、amd64、arm64 镜像?

2021-09-26 16:30:19  阅读:474  来源: 互联网

标签:sha256 x86 manifest platform json arm64 docker desktop distribution


如何使用docker desktop 下载x86、amd64、arm64 镜像?

环境

在这里插入图片描述

修改配置

官网地址,开启 Docker CLI 的实验特性
docker desktop 的Preferences=>>Docker Engine
experimental 的值设置成 true,意思是:开启manifest实验特性

{
  "registry-mirrors": [
    "https://registry.cn-hangzhou.aliyuncs.com"
  ],
  "insecure-registries": [
    "0.0.0.0/0",
    "dockerhub.kubesphere.local:443"
  ],
  "debug": true,
  "experimental": true
}

重启docker后下载镜像

–platform=arm64指定CPU平台架构的镜像

➜  ~ docker pull --platform=arm64 nginx:latest
latest: Pulling from library/nginx
d10c227306ce: Pull complete
6d7f45405386: Pull complete
1b5147f94884: Pull complete
52ae3a597441: Pull complete
3ce50094efa7: Pull complete
7bf647869efa: Pull complete
Digest: sha256:853b221d3341add7aaadf5f81dd088ea943ab9c918766e295321294b035f3f3e
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest

验证镜像架构

docker manifest inspect --insecure nginx:latest

➜  ~ docker manifest inspect --insecure nginx:latest
^[{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1570,
         "digest": "sha256:6fe11397c34b973f3c957f0da22b09b7f11a4802e1db47aef54c29e2813cc125",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1570,
         "digest": "sha256:f6d65972ac54772c5f6b952e396aad3e516fcb250cd5825b98a33a82286c91c2",
         "platform": {
            "architecture": "arm",
            "os": "linux",
            "variant": "v5"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1570,
         "digest": "sha256:8f4514d178b1f178fa04a5307695a7477af68bf95e78ec0ec6172a7ab06c30a2",
         "platform": {
            "architecture": "arm",
            "os": "linux",
            "variant": "v7"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1570,
         "digest": "sha256:f68304ec388f969b0929d695a05a36ecdb3665009258631cb898ba046963e72a",
         "platform": {
            "architecture": "arm64",
            "os": "linux",
            "variant": "v8"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1570,
         "digest": "sha256:0b5b438edb8be60c445a89a4c9043681ea16ef1cfcc0e9c168c059d76fb8e04e",
         "platform": {
            "architecture": "386",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1570,
         "digest": "sha256:3e0cbe127ddfb82dde1e6c150199cfdfdc35c6a4a3cb7b7ff5f8c09e47df00be",
         "platform": {
            "architecture": "mips64le",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1570,
         "digest": "sha256:2472887e70008a6ed87a004c5c70e5fbc6e2e47aeac3d76d149669a4119f4bd6",
         "platform": {
            "architecture": "ppc64le",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1570,
         "digest": "sha256:ef218d58b531ffaf0702b4d8f14501e6d84b25efe384171eb0e839a2f662e676",
         "platform": {
            "architecture": "s390x",
            "os": "linux"
         }
      }
   ]
}

参考文章

标签:sha256,x86,manifest,platform,json,arm64,docker,desktop,distribution
来源: https://blog.csdn.net/shenhonglei1234/article/details/120491110

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有