Merge "Add option to diff containers after config stage."

This commit is contained in:
Jenkins 2017-02-24 21:41:38 +00:00 committed by Gerrit Code Review
commit 66e9c2a346

View File

@ -46,6 +46,15 @@ def pull_image(name):
def rm_container(name): def rm_container(name):
if os.environ.get('SHOW_DIFF', None):
print('Diffing container: %s' % name)
subproc = subprocess.Popen(['/usr/bin/docker', 'diff', name],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
cmd_stdout, cmd_stderr = subproc.communicate()
print(cmd_stdout)
print(cmd_stderr)
print('Removing container: %s' % name) print('Removing container: %s' % name)
subproc = subprocess.Popen(['/usr/bin/docker', 'rm', name], subproc = subprocess.Popen(['/usr/bin/docker', 'rm', name],
stdout=subprocess.PIPE, stdout=subprocess.PIPE,