kaniko issue with multiple AWS ECR registries using aws profiles #2628
Labels
area/authentication
area/aws
area/registry
For all bugs having to do with pushing/pulling into registries
kind/bug
Something isn't working
priority/p2
High impact feature/bug. Will get a lot of users happy
registry/ecr
Refernce link - https://wadehuang36.medium.com/use-aws-ecr-credential-helper-with-multiple-accounts-4c38b7ee37d
First create the kaniko image -
dockerfile to create a custom kaniko image from the upstream kaniko image
Now run the image and exec into it -
docker run -it --entrypoint=/busybox/sh my-custom-kaniko-image:latest
Now inside the container :
Now below is the config.json -
/kaniko/.docker/config.json file
Below is the aws credential file -
~/.aws/credentials file
Now I created 2 shell scripts under /kaniko dir
script #1 - docker-credential-ecr-login-1234.sh
script #2 - docker-credential-ecr-login-5678.sh
I now run
The "context" is a directory that is empty.
The "dockerfile" is below -
I get below error
Expected behavior is that I should not get Not authorized error and kaniko should be able to build and push this image.
The text was updated successfully, but these errors were encountered: