-
Notifications
You must be signed in to change notification settings - Fork 288
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
Allow to push in a private registry. #55
Comments
Hi @Soulou, Can you show me how you were trying? I am looking at the docker-cli source code and it looks like all they do is decode the registry url part of image name (repository) and set that as the ServerAddress of the AuthConfig object. https://github.com/dotcloud/docker/blob/master/registry/registry.go#L81 If you set the Docker.creds to: {
'username' => '',
'password' => '',
'email' => '',
'serveraddress' => ''
} where the data matches up with the private registry, it should work. I will load up a local docker-registry and try it out though. |
Thank for your answer. A private repo may not have any authentication, this is why I didn't really know how to handle that. I've onlly tried But I've just seen that we can do |
Config['registry] = "http://myregistry.example.org"
Docker.authenticate! username: "", password: "", email: "", serveraddress: Config['registry'] Exception:
Server logs:
The suffix "users" is added, I'm going to have a look to docker code. |
Ok, the '/' looks mandatory in my
In this case, the docker daemon contact the registry and ask for the user Docker daemon output:
Registry output:
|
When I'm directly using |
Why not just set Docker.creds instead of trying to use Try: Docker.config = { username: "", password: "", email: "", serveraddress: Config['registry'] } and then with your image do |
Thank you, it works well =) |
Currently, the
Docker::Image#push
method only allow to push on Docker public Index. It may be interesting to be able to push on any registry.The text was updated successfully, but these errors were encountered: