![](/img/trans.png)
[英]Push a Docker image to Google Container Registry from a container running in the GKE
[英]Docker image fails to build on Google Container Registry
我已经设置了一个从 Bitbucket 到 Google Container Registry 的触发器。 我在 root 中有一个 Dockerfile,并且能够从我的本地机器上很好地构建容器。
当触发器运行时,我在 Google Container Registry 中收到此错误(我没有修改 GCR 想要运行的命令 - 这是默认设置)。 我的项目名称已替换为“project”:
FETCHSOURCE
Initialized empty Git repository in /workspace/.git/
From https://source.developers.google.com/p/project/r/bitbucket-project-gateway
* branch c65f16b3f52262a047c71e7140aecc4300265497 -> FETCH_HEAD
HEAD is now at c65f16b testing
BUILD
Already have image (with digest): gcr.io/cloud-builders/docker
invalid argument "gcr.io/project/bitbucket-project-gateway:" for t: invalid reference format
See 'docker build --help'.
ERROR
ERROR: build step "gcr.io/cloud-builders/docker@sha256:e576df764ae28d3c072019a235b6c8966df11eecb472c59b0963d783bb8a713b" failed: exit status 125
看起来图像的标签丢失了(在“:”之后)。
你有cloudbuild.yaml配置文件吗? 如果是这样,你使用一些替换变量(例如$REVISION_ID
)? 也许那里有拼写错误?
干杯,Philmod
对于其他人,在使用 Cloud Build YAML 文件推送 Dockerfile 时遇到同样的问题 - 我的错误:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.