From f899ba2170bed161644a7f50d62f7344793f9b99 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 12 Oct 2018 09:26:28 -0500 Subject: [PATCH] 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 --- pbrx/container_images.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pbrx/container_images.py b/pbrx/container_images.py index cdde477..d5b7273 100755 --- a/pbrx/container_images.py +++ b/pbrx/container_images.py @@ -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)