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

Cannot publish to http (or self-signed https) docker registry #412

Closed
alari opened this issue Nov 18, 2014 · 6 comments
Closed

Cannot publish to http (or self-signed https) docker registry #412

alari opened this issue Nov 18, 2014 · 6 comments

Comments

@alari
Copy link

alari commented Nov 18, 2014

Hi.

I'm trying to start using docker infrastructure with sbt-native-packager and private docker registry https://github.com/docker/docker-registry

It's simple to do sbt docker:publishLocal, but sbt docker:publish for private repo is impossible since it has no ssl certificate or have only self-signed one.

It looks like it's simple to add an option to sbt just to tell docker that registry is insecure. Now the following error is shown:

If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add--insecure-registry 192.168.59.103:5000to the daemon's arguments.

@muuki88
Copy link
Contributor

muuki88 commented Nov 18, 2014

So what you would like, would be a setting dockerDaemonArguments: Seq[String] ?
And then

dockerDaemonArguments += "--insecure-registry 192.168.59.103:5000"

@alari
Copy link
Author

alari commented Nov 18, 2014

I would like to pass daemon arguments in build.sbt, yes.

But after making more investigations I'm not sure if it's possible.

Currently docker supports --insecure-registry argument only on daemon level, not with docker push / docker pull. But sbt have no control over the docker daemon.

They are going to enable passing it to docker push / docker pull in a future version to allow publishing images to local registry without ssl in dev environment. So it might be

dockerPublishArguments += "--insecure-registry 192.168.59.103:5000"

moby/moby#8887

@muuki88
Copy link
Contributor

muuki88 commented Nov 18, 2014

Ah okay. So if you run your daemon with --insecure-registry 192.168.59.103:5000 your problem would actually be fixed?

@alari
Copy link
Author

alari commented Nov 18, 2014

Yep.

@mhamrah
Copy link
Contributor

mhamrah commented Nov 18, 2014

There's been some frustration with the new TLS functionality in docker
1.3.1. If the insecure registry flag was part of docker push I could see
sbt-native-packager support as making sense. But because this is at the
daemon level I don't see how sbt-native-packager can hook into the docker
daemon's arguments. I think your ​best bet is to make sure your docker
daemon is configured correctly so sbt can run as-is.

@muuki88
Copy link
Contributor

muuki88 commented Nov 18, 2014

I'm with @mhamrah

@muuki88 muuki88 closed this as completed Nov 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants