docker-image-resource
docker-image-resource copied to clipboard
Provide credentials for base image different from the image to be built
Hi, i have the following setup:
Dockerfile of "child" image
FROM quay.io/team/base
...do something...
quay.io need authentication and the following would work as expected.
- name: docker-image-tools
type: docker-image
icon: docker
source:
repository: quay.io/team/base
username: ((quay_username))
password: ((quay_password))
Now I want to build the "child" image above, but push it to AWS ECR:
- name: docker-image-child
type: docker-image
icon: docker
source:
repository: account.dkr.ecr.region.amazonaws.com/child
When I execute that I get an error that authentication for quay.io is missing (what is basically OK).
But now the question: Can I provide different credentials for the base image and the image to created/push? Or do i have to ensure that the base image and the target image are in the same repo? I did not find anything related in the docs
Thanks in advance!
I have the same issue and I am wondering why this issue does not affect many more people?
Would it somehow be possible to provide the content of the '.docker/config.json' file to the resource? This way one could craft such a config.json file that contains all needed credentials.
This makes this resource completely unusable when pushing to a different repository now that dockerhub pretty much requires authentication due to rate limiting as you can't authenticate to dockerhub to build the image and push to any different repository