Only pass env variable names to docker run

Specifying the values for environment variables is
not necessary for docker, we can simply pass the names
of the variables to whitelist for pass-through.

This must be done at 'docker run' and may not (currently)
be done via a Dockerfile (without baking the potentially sensitive
values of the params into the image)

Change-Id: I81f229acd33184e8bb2a15c48020e74a32d7ad6c
This commit is contained in:
Eric Windisch 2014-06-11 14:55:33 -07:00
parent 5e7f95254b
commit 3a35b79a81

View File

@ -89,7 +89,7 @@ if __name__ == "__main__":
# create the docker run command line
docker_run = "docker run -d -i"
for env_var in user_env_vars:
docker_run += ' -e "%s=%s"' % (env_var, user_env_vars[env_var])
docker_run += ' -e "%s"' % (env_var,)
if debug:
docker_run += " -v `pwd`:/dev"
docker_run += ' -t %s' % (image)