[英]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.