Docker 镜像无法在 Google Container Registry 上构建

sku*_*erk 4 google-cloud-platform google-container-registry

我已经设置了一个从 Bitbucket 到 Google Container Registry 的触发器。我在根目录中有一个 Dockerfile,并且能够从我的本地机器上很好地构建容器。

当触发器运行时,我在 Google Container Registry 中收到此错误(我没有修改 GCR 想要运行的命令 - 这是默认设置)。我的项目名称已替换为“项目”:

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
Run Code Online (Sandbox Code Playgroud)

Phi*_*mod 5

看起来图像的标签丢失(在“:”之后)。

你有 cloudbuild.yaml 配置文件吗?如果是这样,您是否使用一些替换变量(例如$REVISION_ID)?也许那里有拼写错误?

干杯,菲尔莫德