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

TLS not supported #31

Closed
md5 opened this issue Oct 26, 2014 · 4 comments · Fixed by #33
Closed

TLS not supported #31

md5 opened this issue Oct 26, 2014 · 4 comments · Fixed by #33

Comments

@md5
Copy link
Contributor

md5 commented Oct 26, 2014

I've been playing around with trying to add some features to docker-gen and ran into the fact that it doesn't yet support TLS connections. I have some not-yet-working code that is very close to implementing TLS support here: https://github.com/md5/docker-gen/compare/tls-support

@md5
Copy link
Contributor Author

md5 commented Oct 26, 2014

I think there may be some work needed on go-dockerclient for this to work. See fsouza/go-dockerclient#173.

@md5
Copy link
Contributor Author

md5 commented Oct 27, 2014

I have this working in my branch: https://github.com/md5/docker-gen/compare/tls-support

Here's what I can do on my Mac now using boot2docker 1.3.0 (using the recommended environment settings for DOCKER_HOST, DOCKER_CERT_PATH, and DOCKER_TLS_VERIFY:

$ ./docker-gen <(echo -ne '{{ range $index, $container := $ }}{{ $container.Name }}\n{{ end }}')
echo
nginx-proxy

I think there still needs to be a new command line argument or few to support TLS for specifying the cert file, key, ca file, and verify flag. I also didn't handle the case when DOCKER_TLS_VERIFY is set but not DOCKER_CERT_PATH and it should also detect that the endpoint is "https" and switch to HTTP mode.

Also, it looks like go-dockerclient will have TLS support soon, so it may be worth waiting a bit.

@md5
Copy link
Contributor Author

md5 commented Oct 29, 2014

Once fsouza/go-dockerclient#177 gets merged, I should be able to submit a PR for this.

@md5
Copy link
Contributor Author

md5 commented Nov 3, 2014

Working TLS support has been merged in https://github.com/fsouza/go-dockerclient, so I've updated my branch here: https://github.com/md5/docker-gen/compare/tls-support-2nd-attempt

I think this still needs some docs before I create a PR. Also, I didn't handle detecting the TLS settings from the environment (i.e.. DOCKER_TLS_VERIFY and DOCKER_CERT_PATH), mainly because the whole area feels like a mess to me. That probably has to be added in some sane form before a PR can be proposed.

@md5 md5 mentioned this issue Nov 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant