Skip to content

Commit

Permalink
Diffuse KEEP_IMAGES environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravid Brown committed Jan 4, 2018
1 parent 7cedfc1 commit a1f6cef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion skipper/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ def _run_nested(fqdn_image, environment, command, interactive, name, net, volume
docker_cmd += ['--name', name]

docker_cmd += ['-t']
docker_cmd += ['--rm'] if not os.environ.get("KEEP_CONTAINERS", False) else []

if os.environ.get("KEEP_CONTAINERS", False):
docker_cmd += ['-e', 'KEEP_CONTAINERS=True']
else:
docker_cmd += ['--rm']

docker_cmd += ['--privileged']

docker_cmd += ['--net', net]
Expand Down

0 comments on commit a1f6cef

Please sign in to comment.