victimsss
V2EX  ›  Docker

镜像 registry 是什么下发不同架构的镜像的

  •  
  •   victimsss · Sep 22, 2023 · 1078 views
    This topic created in 973 days ago, the information mentioned may be changed or developed.
    之前做的一个项目,采用的是 OCI 的一点规范 https://github.com/opencontainers/distribution-spec/blob/main/spec.md 。对于单架构来说,cli 获取 manifest ,然后再拉取 blob 。
    对于多架构的处理我不太清楚,不知道 docker pull --platform 下载指定架构的镜像,cli 和 registry 的交互逻辑是什么。
    之前做了一个错误的版本,以为是通过 UA 来识别, 比如 header['user-agent'] 为 OS/linux arch/amd64 的时候给对应的机器下发适合这台机器的镜像,后来发现被不符合标准。
    目前得到的信息是:docker cli 会先从 registry 获取 manifest list ( fit-list ) ,在从 list 拿到对应架构的 manifest ,再获取 blob 。
    不知道没有大佬了解这相关的内容,请赐教。
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2855 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 82ms · UTC 13:51 · PVG 21:51 · LAX 06:51 · JFK 09:51
    ♥ Do have faith in what you're doing.