google-cloud-platform - 为什么我的Container Builder构建失败并显示“执行构建步骤后找不到一个或多个图像”

标签 google-cloud-platform google-container-registry google-container-builder

我不明白此错误消息的含义。它发生在我的构建结束时,即构建完成并标记了图像时。这是日志的结尾:

Step 17/18 : WORKDIR /var/www
---> 0cb8de2acd8f
Removing intermediate container 7e7838eac6fb
Step 18/18 : CMD bundle exec puma -C config/puma.rb
---> Running in 9089eb79192b
---> 890a53af5964
Removing intermediate container 9089eb79192b
Successfully built 890a53af5964
Successfully tagged us.gcr.io/foo-staging/foobar:latest
ERROR
ERROR: failed to find one or more images after execution of build steps: ["us.gcr.io/foo-staging/foobar:a2122696c92f430529197dea8213c96b3eee8ee4"]


这是我的cloudbuild.yaml

steps:
- name: 'gcr.io/cloud-builders/docker'
  args: [ 'build', '-t', 'us.gcr.io/$PROJECT_ID/foobar', '.' ]
images:
- 'us.gcr.io/$PROJECT_ID/foobar:$COMMIT_SHA'
- 'us.gcr.io/$PROJECT_ID/foobar:latest'
timeout: 3600s


我以为这可能是暂时性故障,但是我重试了构建,然后又发生了。

最佳答案

啊,我需要在构建步骤中标记构建:

steps:
- name: 'gcr.io/cloud-builders/docker'
  args: [ 'build', '-t', 'us.gcr.io/$PROJECT_ID/foobar:$COMMIT_SHA', '-t', 'us.gcr.io/$PROJECT_ID/foobar:latest', '.' ]
images:
- 'us.gcr.io/$PROJECT_ID/foobar:$COMMIT_SHA'
- 'us.gcr.io/$PROJECT_ID/foobar:latest'
timeout: 3600s

关于google-cloud-platform - 为什么我的Container Builder构建失败并显示“执行构建步骤后找不到一个或多个图像”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47784390/

相关文章:

google-cloud-platform - 谷歌云存储提供 ServiceUnavailable : 503 exception Backend Error

java - GoogleJsonResponseException : 400 Bad Request "Invalid query parameter type"

docker - Google 容器注册表权限

google-cloud-platform - 谷歌云容器构建器并不总是从 bitbucket 触发

Google Cloud Container Builder - 使用 vendor 的依赖项从 Go 源代码构建 Docker 容器

database - 使用 SHA1 key 避免 BigTable 或 HBase 中的热点

java - 我应该在(Java)App Engine maven 属性中的哪里设置 "environment"变量 - GAE Maven 模板

docker - Google容器引擎在从容器注册表中提取图像时遇到问题

docker - `docker-credential-gcloud` 不在系统路径中

kubernetes - 如何以编程方式从其中一个集群中获取当前的 GKE 项目 ID?