drone-docker icon indicating copy to clipboard operation
drone-docker copied to clipboard

Allow base image from a private repository

Open vincent-hatakeyama opened this issue 7 years ago • 10 comments

It’s possible to use a private registry with its credentials, but if the base image uses a private registry that is different from the one used for the new image, this plugin doesn’t provide a way to give the credentials.

I’d like to be able to either: – use the registry information on the project in drone, – or provide new variables to use in the .drone.yml.

vincent-hatakeyama avatar Jul 30 '18 12:07 vincent-hatakeyama

Have you tried to provide registry credentials to drone?

tboerger avatar Jul 30 '18 18:07 tboerger

Yes there is registry credentials (in settings/registry) and they do not appear to be used by the plugin. From what I understood of the code, there is only a single docker login done and its with the credentials given. It’s not possible to build an image where the base image and the result need different credentials.

vincent-hatakeyama avatar Aug 09 '18 14:08 vincent-hatakeyama

the only think I can think of is that we optionally allow the user to provide a docker_config_json secret variable, which is essentially just the .docker/config.json file, which can store authentication credentials for multiple providers. Then we can write this to the /root/.docker/config.json

bradrydzewski avatar Aug 09 '18 17:08 bradrydzewski

It would be better to use the registry information in drone (…/settings/registry) as the information is already there, just not used. I’m not sure it is given to plugins.

vincent-hatakeyama avatar Aug 10 '18 09:08 vincent-hatakeyama

Any plans for this?

natlibfi-arlehiko avatar Nov 16 '18 11:11 natlibfi-arlehiko

Pulling from private registry seems to be working with this https://discourse.drone.io/t/how-to-pull-private-images-with-1-0/3155

poksiala avatar Jun 18 '19 10:06 poksiala

Yeah, it does now.

natlibfi-arlehiko avatar Jun 18 '19 10:06 natlibfi-arlehiko

Has this problem been solved?

ywanbing avatar Jul 28 '24 04:07 ywanbing

@vincent-hatakeyama I have also encountered this problem now, is there any good method?

ywanbing avatar Jul 28 '24 04:07 ywanbing