From cd9a3ea255a378f55c579a84dcec42f0c712e6e8 Mon Sep 17 00:00:00 2001 From: ewandor Date: Thu, 21 Sep 2023 17:39:45 +0200 Subject: [PATCH] Pruning all unused docker images, inclunding non dangling --- README.md | 2 +- main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b43f9e0..c1b8e24 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Calls portainer's API and updates the images of all currently active stacks ## Usage Update configuration file with your portainer access token and the path of portainer compose directory -After restarting all container, it prunes all unused images +After restarting all container, it prunes all unused images, including non dangling ones You can then simply execute: diff --git a/main.py b/main.py index 930de35..8901a58 100644 --- a/main.py +++ b/main.py @@ -29,4 +29,4 @@ if __name__ == '__main__': if s['Status'] == 1: update_stack(s) - os.system('docker image prune -f') + os.system('docker image prune -fa')