Open devjgm opened 3 years ago
Note: I changed to use gcr.io/kaniko-project/executor:edge
instead of :latest
, AND I changed my images to use gcr.io
instead of us-central1-docker.pkg.dev
and it works now.
This problem is still happening. I get the above stack trace when I run with gcr.io/kaniko-project/executor:v1.6.0
BUT, it works when I use gcr.io/kaniko-project/executor:v1.6.0-debug
Naive guess at the problem
My guess is that the problem is w/ the https://github.com/GoogleCloudPlatform/docker-credential-gcr/ library. The stack trace above seems to indicate this.
And the v1.6.0
and v1.6.0-debug
images are using different versions of the docker-credential-gcr
helper.
WORKS (the -debug
version)
https://github.com/GoogleContainerTools/kaniko/blob/7b6495426d9a4713b997a1afcf197d87eecb33a3/deploy/Dockerfile_debug#L32-L34
tl;dr if kaniko wants to build this static binary, they need to pass more flags: https://github.com/golang/go/issues/24787#issuecomment-387611691
I have same issue and v1.6.0-debug helps me
Actual behavior
The above error happens when after Kaniko builds a docker layer and tries to push it from Cloud Build to artifact registry.
cloudbuild.yaml
The Dockerfile I'm building is here: https://github.com/googleapis/google-cloud-cpp/compare/master...devjgm:cloud-build?expand=1#diff-c1691ed788ae6246565bad5ac37a26da8a3ee735f4c2e8f07b5b205ad47b4f26
The artifact registry repo exists:
Expected behavior
I believe I correctly followed the instructions at https://cloud.google.com/build/docs/kaniko-cache and I expected Kaniko to successfully upload the layers and final image to artifact registry, but instead it crashes.
To Reproduce
If this is not a known bug that I'm hitting, I can try to distill the repro steps to something smaller.
Additional Information
Kaniko Image (fully qualified with digest)
Triage Notes for the Maintainers
--cache
flag