diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-03-13 20:13:41 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-03-13 20:13:41 +0000 |
commit | 0162749f71c6831f3078ef2c7277f208aac05042 (patch) | |
tree | 73f11ad14aaedc7f628f62583a133a61c71cc046 | |
parent | 25a4719c9859b1f6e93266ea2a6617ea2a94c327 (diff) | |
parent | 3cba27131a6cd5362d35bc0268b2a6ccd29f3e41 (diff) |
Merge "Pass the DOCKER_* env vars when running docker"
-rwxr-xr-x | docker/docker-puppet.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py index 157bf63f..0f079436 100755 --- a/docker/docker-puppet.py +++ b/docker/docker-puppet.py @@ -210,6 +210,11 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume dcmd.extend(['--entrypoint', sh_script]) env = {} + # NOTE(flaper87): Always copy the DOCKER_* environment variables as + # they contain the access data for the docker daemon. + for k in filter(lambda k: k.startswith('DOCKER'), os.environ.keys()): + env[k] = os.environ.get(k) + if os.environ.get('NET_HOST', 'false') == 'true': print('NET_HOST enabled') dcmd.extend(['--net', 'host', '--volume', |