Google 云:构建总是失败,MANIFEST_UNKNOWN 错误

Google Cloud: Build always fails, MANIFEST_UNKNOWN error

我正在尝试部署一个 App Engine 应用程序,但无论我尝试部署哪个代码,即使它是从他们的示例中获取的:

https://github.com/GoogleCloudPlatform/golang-samples

我得到同样的错误:

Step #1: error building image: getting stage builder for stage 0: MANIFEST_UNKNOWN: "Manifest with digest 'sha256:249859465bcde1cb15128ff0d9eb2bb54de67f72a834a7576e6649cfe0a27698' has media type 'application/vnd.docker.distribution.manifest.list.v2+json', but client accepts 'application/vnd.docker.distribution.manifest.v2+json'."

我不擅长 devops,所以不知道如何解决这个问题

我今天在 AppEngine Flexible 上部署时遇到了同样的问题。 我不认为这是你能做的事。 我在 github 上提出了一个问题,希望 google 云团队能够快速解决它。

关于信息,OP 的问题是当 运行 gcloud app deploy app.yaml 他希望应用程序确实被部署。

Cloud Build 尝试获取其无法理解的媒体类型的图像。

得到:application/vnd.docker.distribution.manifest.list.v2+json 预期:application/vnd.docker.distribution.manifest.v2+json

Step #0: gcr.io/gcp-runtimes/go1-builder@sha256:7b53332a8e6418ba9a3f123c29dd5fe075504d0f9c0b683edfc7e7b75cd27822
Finished Step #0
Starting Step #1
Step #1: Already have image (with digest): gcr.io/kaniko-project/executor@sha256:f87c11770a4d3ed33436508d206c584812cd656e6ed08eda1cff5c1ee44f5870
Step #1: INFO[0000] Downloading base image gcr.io/distroless/base@sha256:884ac2144c3ee154bd67271e99bc6ef00f430092750167729b0321ab55fde5ec 
Step #1: error building image: getting stage builder for stage 0: MANIFEST_UNKNOWN: "Manifest with digest 'sha256:884ac2144c3ee154bd67271e99bc6ef00f430092750167729b0321ab55fde5ec' has media type 'application/vnd.docker.distribution.manifest.list.v2+json', but client accepts 'application/vnd.docker.distribution.manifest.v2+json'."

我最近遇到了同样的问题。经过一番挖掘,事实证明该问题已在 GCP 问题跟踪器上报告:https://issuetracker.google.com/issues/171756486

解决方法是更新 app.yaml 文件以包含 runtime: go1.13.

更新:

使用 runtime: go1.13 部署仅适用于第一个 运行。 尝试 re-deploy.

时仍然会失败

更新二:

Google 团队已经回滚了他们这边的问题。 (source)

要使其正常工作,您需要将 gcloud 降级到版本 315.0.0:

gcloud components update --version 315.0.0

之后,部署将照常进行。

Google 回复了这个 bug ticket 说要降级到 gcloud 315.0.0 我刚刚测试过并且有效。

gcloud components update --version 315.0.0

我遇到了同样的问题并通过添加

来解决

service: default

在我的 app.yaml