aboutsummaryrefslogtreecommitdiff
path: root/kolla
diff options
context:
space:
mode:
authorJoshua Harlow <jxharlow@godaddy.com>2016-11-08 16:34:16 -0800
committerJoshua Harlow <jxharlow@godaddy.com>2016-11-08 16:34:17 -0800
commit8df37b6ea1b78e4e56cb2500ee06cbcc41f76618 (patch)
tree18919dde6f2daf119c08eb375a7b162ebfe611f1 /kolla
parentda832be870cb269f9dea25eacdd5332ad912bfd1 (diff)
downloadkolla-8df37b6ea1b78e4e56cb2500ee06cbcc41f76618.tar.gz
kolla-8df37b6ea1b78e4e56cb2500ee06cbcc41f76618.zip
Show the rendered docker file
It can be quite useful (especially while debugging) to see exactly what the final rendered Dockerfile actually is; so when it is being rendered, log it at DEBUG level (so that users running with DEBUG) can see it. Change-Id: I28b6f49a7d2f01d155f7885b6ab275c03c4e14af
Diffstat (limited to 'kolla')
-rw-r--r--kolla/image/build.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/kolla/image/build.py b/kolla/image/build.py
index 231824e85..8d5d6ee48 100644
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -695,8 +695,12 @@ class KollaWorker(object):
with open(self.include_footer, 'r') as f:
values['include_footer'] = f.read()
content = template.render(values)
- with open(os.path.join(path, 'Dockerfile'), 'w') as f:
+ content_path = os.path.join(path, 'Dockerfile')
+ with open(content_path, 'w') as f:
+ LOG.debug("Rendered %s into:", tpl_path)
+ LOG.debug(content)
f.write(content)
+ LOG.debug("Wrote it to %s", content_path)
def find_dockerfiles(self):
"""Recursive search for Dockerfiles in the working directory"""