[英]Docker image fails to build on Google Container Registry
I have setup a trigger from Bitbucket to Google Container Registry.我已经设置了一个从 Bitbucket 到 Google Container Registry 的触发器。 I have a Dockerfile in the root, and am able to build the container fine from my local machine.
我在 root 中有一个 Dockerfile,并且能够从我的本地机器上很好地构建容器。
I get this error in Google Container Registry when the trigger runs (I did not modify the command that GCR wanted to run - it's the default).当触发器运行时,我在 Google Container Registry 中收到此错误(我没有修改 GCR 想要运行的命令 - 这是默认设置)。 My project name has been replaced with "project":
我的项目名称已替换为“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
It looks like the image's tag is missing (after the ":"). 看起来图像的标签丢失了(在“:”之后)。
Do you have a cloudbuild.yaml config file? 你有cloudbuild.yaml配置文件吗? If so do you use some substitutions variables (eg
$REVISION_ID
)? 如果是这样,你使用一些替换变量(例如
$REVISION_ID
)? Maybe there is a misspelling there? 也许那里有拼写错误?
Cheers, Philmod 干杯,Philmod
For others who come along, when running into this same issue when pushing a Dockerfile with a Cloud Build YAML file - my mistakes:对于其他人,在使用 Cloud Build YAML 文件推送 Dockerfile 时遇到同样的问题 - 我的错误:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.