Unable to push image to GCR when using base image from private registry #1293
Labels
area/registry
For all bugs having to do with pushing/pulling into registries
kind/enhancement
New feature or request
kind/question
Further information is requested
needs-reproduction
priority/p2
High impact feature/bug. Will get a lot of users happy
Actual behavior
Unable to build and image image to gcr registry when using a base image from a private registry
Expected behavior
Should be able to pull images from a private registry to build my docker image and push the image to gcr registry.
To Reproduce
I have a
Dockerfile
that use a base image registry.redhat.io/rhel8/nginx-116 from registry.redhat.io which is a private registry. The dockerfile looks something like this:I use cloud build to build and push the image to gcr.io using the kaniko executor. The
cloudbuild.yaml
is define like so:The
dockerconfig
step populates theconfig.json
for kaniko so that it can pull the image from the redhat registry.Steps to reproduce the behavior:
When I try to build the image with:
The build fails with the following UNAUTHORIZED error
If I build with
--no-push
argument, the build succeeds indicating that kaniko was able to pull the image from the redhat registry.I am not able to understand why kaniko is not able to AUTHORIZE with GCR when I have a custom
config.json
defined for redhat authentication.Is there a way to make this use-case work with kaniko?
Thanks for your help!
The text was updated successfully, but these errors were encountered: