-
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
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! |
ENV['DOCKER_CERT_PATH'] = '/boot2dockert/cert/path' | ||
end | ||
|
||
its(:options) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_HOST
andDOCKER_CERT_PATH
environment 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! ❤️