Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pull from private registry? #180

Open
vimpunk opened this issue Jul 4, 2019 · 4 comments
Open

How to pull from private registry? #180

vimpunk opened this issue Jul 4, 2019 · 4 comments

Comments

@vimpunk
Copy link

vimpunk commented Jul 4, 2019

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!

@schrieveslaach
Copy link
Contributor

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).

@vimpunk
Copy link
Author

vimpunk commented Jul 5, 2019

@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?

@schrieveslaach
Copy link
Contributor

schrieveslaach commented Jul 5, 2019

The recent version 0.5.0 of shiplift added support for authentication (see here). I think, GitLab enforces authentication.

@vimpunk
Copy link
Author

vimpunk commented Jul 8, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants