Skip to content

Commit

Permalink
added logic to check if autoremove key is present (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
circa10a authored Feb 23, 2019
1 parent 129cefb commit 593c3c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyouroboros/dockerclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ def running_filter(self):
else:
try:
if 'ouroboros' not in container.image.tags[0]:
running_containers.append(container)
if container.attrs['HostConfig']['AutoRemove']:
self.logger.debug("Skipping %s due to --rm property.", container.name)
else:
running_containers.append(container)
except IndexError:
self.logger.error("%s has no tags.. you should clean it up! Ignoring.", container.id)
continue
Expand Down

0 comments on commit 593c3c6

Please sign in to comment.