Add debug info about base image sha

In order to debug issues, knowing what version of a base docker image is
in use can be helpful. Grab it and print it out.

Change-Id: I741b56bf4f8f8d1edd7e40da415b26c2e3dd13d7
This commit is contained in:
Monty Taylor 2018-10-12 09:26:28 -05:00
parent 2cd72150d7
commit f899ba2170
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 6 additions and 0 deletions

View File

@ -66,6 +66,12 @@ class ContainerContext(object):
host=os.path.expanduser('~/.config/pip/pip.conf'),
guest='/root/.config/pip/pip.conf'))
self.create()
log.debug(
"Used base image {base} at sha {sha}".format(
base=self._base,
sha=sh.docker.images('-q', self._base).strip(),
))
self._cont = sh.docker.bake("exec", self.run_id, "sh", "-c",
_truncate_exc=False)