Unset env vars behavior in 'run' mirroring engine

Unset env vars passed to `run` via command line options take the
value of the system's var with the same name.

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2016-04-22 14:45:51 -07:00 committed by Aanand Prasad
commit 70da16103a
3 changed files with 23 additions and 1 deletions

View file

@ -891,7 +891,9 @@ def build_container_options(options, detach, command):
}
if options['-e']:
container_options['environment'] = parse_environment(options['-e'])
container_options['environment'] = Environment.from_command_line(
parse_environment(options['-e'])
)
if options['--entrypoint']:
container_options['entrypoint'] = options.get('--entrypoint')