简体   繁体   English

创建多清单清单

[英]Creating Multiarch Manifest

I'm trying to use Google Cloud Build to build multiarch images and a supporting manifest so I can run my containers on both amd64 and arm processors. 我正在尝试使用Google Cloud Build构建多体系结构映像和支持清单,以便可以在amd64和arm处理器上运行容器。 I can successfully build two images, but I'm unable to generate the multiarch manifest necessary... getting errors that manifests for the images I've just generated don't exist. 我可以成功构建两个映像,但是无法生成必要的多体系结构清单...获取针对我刚刚生成的映像的清单的错误不存在。

Here's the stage that fails: 这是失败的阶段:

- name: 'gcr.io/cloud-builders/docker' id: 'manifest' env: - 'DOCKER_CLI_EXPERIMENTAL=enabled' args: - 'manifest' - 'create' - 'gcr.io/$PROJECT_ID/village:$COMMIT_SHA' - 'gcr.io/$PROJECT_ID/village:arm32v6' - 'gcr.io/$PROJECT_ID/village:amd64' waitFor: ['amd64', 'arm']

which produces the error: 产生错误:

no such manifest: gcr.io/village/village:arm32v6 Already have image (with digest): gcr.io/cloud-builders/docker

A previous step of my build results in: Step #1 - "arm": Successfully tagged gcr.io/village/village:arm32v6 . 构建的上一个步骤是: Step #1 - "arm": Successfully tagged gcr.io/village/village:arm32v6

Do I somehow need to push the individual images before generating the multiarch manifests? 在生成多层记录清单之前,我是否需要以某种方式推送单个映像? Is it possible run continue running cloud-build commands after pushing images? 推送映像后是否可以继续运行cloud-build命令?

It turns out you have to push the dependencies before you can create the manifest. 事实证明,您必须先push依赖项才能创建清单。 Adding a step like below did the trick! 添加如下所示的步骤就可以了!

- name: 'gcr.io/cloud-builders/docker' id: 'push-arm' args: - 'push' - 'gcr.io/$PROJECT_ID/village:arm32v6' waitFor: ['arm']

I ended up documenting the final configs here in case anyone else runs into this problem. 我最终在这里记录了最终的配置,以防其他人遇到此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM