-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Resolve environment without values to values on host #297
Conversation
👍 |
@aanand This is an implementation of what you suggested in # 1 of your comment on #227. Just wanted to make sure you saw it. |
Yes! Was trying it out earlier - looks good. I'll merge it tomorrow. On Tue, Jul 8, 2014 at 10:09 PM, Ryan Brainard notifications@github.com
|
Would be good to get documentation too. |
@bfirsh Just added documentation |
Great, thanks! Needs rebasing against master too. |
For parity with the Docker CLI, allow environment variables without values to be automatically resolved to their values on the host. Signed-off-by: Ryan Brainard <brainard@heroku.com> Conflicts: tests/integration/service_test.py
Signed-off-by: Ryan Brainard <brainard@heroku.com>
@bfirsh Rebased and re-ran tests. |
Great stuff! Thanks so much, Ryan. |
Resolve environment without values to values on host
Thank you! :) |
Resolve environment without values to values on host Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Sigchld reaper has been removed from containerd procss in 8476905, so the comment is not need any more. Signed-off-by: Lei Jitang <leijitang@huawei.com>
For parity with the Docker CLI, allow environment variables without values to be automatically resolved to their values on the host.
If someone defines an
environment
as alist
, this also converts it to adict
so the above resolution works as expected. Definingenvironment
asdict
is canonical, but using alist
already worked, so this conversion supports backward compatibility.docker-py resolves
environment
with a value ofNone
to the string'None'
, which is not what someone would want if the value could not be found in the host's environment. This resolves that case to empty string, which is how Docker CLI also handles this situation.Fixes #277