-
Notifications
You must be signed in to change notification settings - Fork 111
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
Integrate docker login for private repositories #28
Comments
I'm interested in your use case. Can you explain where you need it? Regarding your suggested solution. I think it would be better to handle credentials globally. You set them once and then they are automatically used whenever they are needed. |
To be honest, I mostly asked because this is the way we currently push Docker images from Ansible. I'll look into the reasons behind this but I assume the main reason is to make builds self-contained instead of requiring some form of initialization. I guess we could offer a AFAIK DockerHub requires the email address as a third parameter next to username and password so reusing the existing |
I like the idea of having a If you decide to build it is probably best to create a new credentials class. |
Hi Marcus. I lost track of this for a while but we are still working around this so I wanted to pick it up again. I think the I guess we could use a What do you think? |
I have started prototyping on integrating scala-docker into sbt-docker. So that sbt-docker does not have to call the Regarding interactive task or not. I think it will be sufficient to have the credentials in a
|
True, environment vars would be a good way to deal with this. Does the fact that the |
The use case for multiple credentials is that you might push images to different registry, or you might pull from one registry and push to another. You can build many Docker images from the same sbt project. All auths in |
Wouldn't it make more sense to couple the credentials to the registry in some way? So you specify them together to prevent having to try a set of credentials meant for different registries on one registry? |
As I see it case class DockerRegistryCredentials(url: String, email: String, password: String) Then the email and password is coupled with the url to the registry. Do you have another idea for it? |
Hi. Did this by chance get resolved? We are using a private registry (Artifactory) and "docker login" is how we are currently authenticating against the repo. Any help would be great! |
Note, still need to use the `docker` service in Travis, as you cannot programmatically log in to private repositories, like Heroku. See marcus-drake/sbt-docker#28 for more details.
Hi Marcus, |
We push to a private registry (i.e. on dockerhub but private) so before we can do a
docker push
, we need to calldocker login
. It would be great if this plugin would support this.Suggested solution:
DockerRegistry
case class instead of the String currently used inImageName
and add aprivate
boolean and an optionalcredentials
fieldDockerPush
to perform the necessarydocker login
command for private registriesDockerPush
to perform thedocker logout
command afterwardsI'll probably start building this very soon since our project needs these features so if you agree with the suggested solution, I'll send you a pull request next week.
Regards,
Age
The text was updated successfully, but these errors were encountered: