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
mandreyel opened this issue Jul 4, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@mandreyel
Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2019

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

@mandreyel

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2019

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

@mandreyel

This comment has been minimized.

Copy link
Author

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
You can’t perform that action at this time.