Skip to content
This repository has been archived by the owner on Nov 23, 2022. It is now read-only.

[WIP] Add support for private Docker repositories / registries #19

Conversation

maxime1992
Copy link

@maxime1992 maxime1992 force-pushed the feat/support-private-registries branch from 680755e to beb27c7 Compare January 28, 2019 09:04
@maxime1992
Copy link
Author

maxime1992 commented Jan 28, 2019

Hey @yamalight 😺

I've decided to try fixing exoframejs/exoframe#117 but as I don't have much time to work on that I'd really appreciate a bit of help from you, to help me understand how things work around.

I've noticed that you're using dockerode and I read the documentation.
I found that it's possible to connect to private registries by setting the auth.
I tried with a small dockerode project to pull my private Docker image and it did work.

So my question is, how can that be useful?
If I have a Docker-compose file where let say I define my private image. Docker will try by itself to pull it, am I correct? So This approach would only work for non docker-compose project? For one Docker image only? Can you think of a better approach?

PS: that PR is (probably) far from being done, but I've raised the MR request so that we have a place to exchange ideas about the approach and evolution 😃

@coveralls
Copy link

coveralls commented Jan 28, 2019

Coverage Status

Coverage increased (+0.02%) to 86.099% when pulling beb27c7 on maxime1992:feat/support-private-registries into 1958e36 on exoframejs:master.

@yamalight
Copy link
Contributor

@maxime1992 this is awesome! thank you for your work ❤️

Yes indeed, this would only work for non-compose deployments. Compose is kinda completely separate from the rest of exoframe. I think docker stack has --with-registry-auth flag for that, but I'm not sure just compose can be addressed 🤔
Might be simpler to just document that you have to log in with your docker daemon manually (since compose is executed via binary invocation).

@maxime1992
Copy link
Author

this is awesome! thank you for your work

Thanks!

Compose is kinda completely separate from the rest of exoframe

That makes sense

you have to log in with your docker daemon manually (since compose is executed via binary invocation)

I wanted to try that one out but unfortunately I keep getting 502 bad gateway while trying to deploy now for some reasons 🤷‍♂️ Because I've logged into the Gitlab private registry and I think it should work (???) from docker-compose but I wasn't able to test it.

In regards of that PR, it might still be useful IMO to get it done. Do you think that too? For simple Docker images. If so, can you please let me know where you think it might make sense to add that config? I think into the project config but I'm not 100% sure

@yamalight
Copy link
Contributor

yamalight commented Jan 28, 2019

@maxime1992 I'd absolutely love to have that for normal docker deployments.
I'd say the config should be read from two places:

  1. globally from exoframe-server config
  2. locally from project config

If local exists - it's the one that's used, if not - fall back to global, if it doesn't exists - don't attach anything 🤔

Small note: please change the PR target to develop branch 😃

@maxime1992
Copy link
Author

Sorry I completely lost track on that one and would probably be faster to rework from group up.

Feel free to reopen or take over!

@maxime1992 maxime1992 closed this Oct 21, 2019
@alexanderadam
Copy link

Oh no! 😿

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants