aboutsummaryrefslogtreecommitdiffstats
path: root/docker/docker-puppet.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-03-13 20:13:41 +0000
committerGerrit Code Review <review@openstack.org>2017-03-13 20:13:41 +0000
commit0162749f71c6831f3078ef2c7277f208aac05042 (patch)
tree73f11ad14aaedc7f628f62583a133a61c71cc046 /docker/docker-puppet.py
parent25a4719c9859b1f6e93266ea2a6617ea2a94c327 (diff)
parent3cba27131a6cd5362d35bc0268b2a6ccd29f3e41 (diff)
Merge "Pass the DOCKER_* env vars when running docker"
Diffstat (limited to 'docker/docker-puppet.py')
-rwxr-xr-xdocker/docker-puppet.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py
index 157bf63..0f07943 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',