shiplift
shiplift copied to clipboard
How to pull from private registry?
It's not clear whether I need to specify the registry url in the src method or if I can just use registry.url.com/path/image:tag as the image name. Apparently the latter doesn’t work as I get a 500 error (pulling the same image the docker CLI works). Help would be appreciated!
Do you pull the image before you start a container?
We use a private registry and pull the image always before we start the container (cf. code PREvant that uses pulling images and starting containers of shiplift).
@schrieveslaach Thank you for your help.
Yes, I do pull the image, and that's when I get this error: Docker Error: 500 Internal Server Error. Again, just pulling the same image from the same registry using the CLI works fine, so it's definitely not our registry.
To be more precise I'm trying to pull an image from our private GitLab registry, with the url registry.ourdomain.com/project/repo:tag. Is this the correct form? [edit]: could it be that GitLab implements a different API for the registry than what shiplift is expecting?
I've looked at your code and I don't see the RegistryAuth anywhere in the linked code that pulls the image. Where do you authenticate?
The recent version 0.5.0 of shiplift added support for authentication (see here). I think, GitLab enforces authentication.
@schrieveslaach Thanks for your response. I did include the registry authentication bit, to no avail. Anyway, we've decided not to use this library for now, but I appreciate that your input, I might return once it's more production ready.