mirror of https://github.com/docker/docker-py.git
Fixed a bug where images and containers would be removed after a successful build
This commit is contained in:
parent
f2bcd532d7
commit
a444397b9e
|
@ -284,8 +284,10 @@ class BuilderClient(object):
|
|||
self.logger.addHandler(logging.StreamHandler(self.logs))
|
||||
|
||||
def done(self):
|
||||
self.client.remove_container(*self.tmp_containers)
|
||||
self.client.remove_image(*self.tmp_images)
|
||||
if self.image is None:
|
||||
# The build is unsuccessful, remove temporary containers and images
|
||||
self.client.remove_container(*self.tmp_containers)
|
||||
self.client.remove_image(*self.tmp_images)
|
||||
self.logs.flush()
|
||||
res = self.logs.getvalue()
|
||||
#self.logs.close()
|
||||
|
|
Loading…
Reference in New Issue