I have Drone set up on our gke kubernetes and would like to pull one of our private containers from the Google Container Registry as part of the Drone pipeline. There’s a plugin for publishing to the GRC but I can’t find any instructions for pulling from it. Would I have to make a plugin for this? Or perhaps I could pull some public docker ubuntu image, install docker and gcloud tools on it, then manually fetch our image on GRC and copy the files manually out of it?
To pull from a private registry you just need to add your registry credentials to your repository. See http://docs.drone.io/manage-registry-credentials/ for more details.
Thanks! I think I’ve figured out the proper user/pass to use with the
drone registry add... command, but where should I run that command? I can’t put it in the pipeline can I? I’m using the drone and drone-agent docker images loaded into kubernetes pods.
you run the CLI from your terminal (e.g. on your laptop) and it will add the registry credentials to your drone repository. The next time your pipeline executes, the registry credentials are available to pull images.
Please see the CLI documentation for more details:
I installed the CLI and
drone info returns my use info properly, and
drone repo info worked properly for one of our repos. But I ran
drone registry add ... with my repo, hostname, user and pass, and it only responds with
client error 404:
Oh, I just read the help you gave for someone else who had this error with that command. I was using my docker repository instead of the github one, so I switched it to the github repo and now the command works.