Support the ENV variables used by boot2docker.#210
Conversation
|
@pwnall, awesome, thanks. Will review with an eye to merge soon. |
|
@bfulton Thank you! I look forward to your feedback! |
There was a problem hiding this comment.
This should have a should == before the hash, correct? I don't think /boot2dockert/cert/path/https is a correct value.
There was a problem hiding this comment.
Thank you for catching that!
Yup, I assumed that the test case is taking advantage of some RSpec shorthand.
I fixed this pattern everywhere in the spec for the Docker object.
Also, I had to copy-paste Docker.options = nil to every before block that changes environment vars, because the docker's before block executes before the context-specific before blocks, so options never actually changed before.
Previous tests didn't catch this because they were all testing for the same result, namely the empty hash.
|
@tlunter Thank you very much for the feedback! Can you please take another look? |
|
👍 Fantastic! |
|
@pwnall looks good overall! Is the order of precedence — |
|
@bfulton I didn't check |
|
Ah, that's great. We checked the original precedence, and I just misunderstood that it wasn't changed and that |
Support the ENV variables used by boot2docker.
|
@bfulton Thank you for merging, and much gratitude for this gem! ❤️ |
|
@pwnall thank you! This is released in v1.15.0, and pushed to RubyGems. |
|
@bfulton Sweet! Thanks so much for the quick turnaround!! I just confirmed that v1.15.0 works out of the box with boot2docker on OSX. 😄 |
Boot2docker currently installs docker 1.3, which uses https and certificates. It sets up the
DOCKER_HOSTandDOCKER_CERT_PATHenvironment variables. The docker client understands these variables, so it would be nice if docker-api understood them too.This should fix #202 without the need for custom configuration.
I did my best to minimize changes and to get spec coverage for the code change. I would be happy to incorporate any feedback into the diff.
Please consider merging this, so docker-api can work with boot2docker on OSX out of the box! ❤️