Pruning all unused docker images, inclunding non dangling

This commit is contained in:
ewandor committed 2023-09-21 17:39:45 +02:00
1 parent 56f303cce7
commit cd9a3ea255
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ Calls portainer's API and updates the images of all currently active stacks
## Usage ## Usage
Update configuration file with your portainer access token and the path of portainer compose directory 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: You can then simply execute:
+1 -1
View File
@@ -29,4 +29,4 @@ if __name__ == '__main__':
if s['Status'] == 1: if s['Status'] == 1:
update_stack(s) update_stack(s)
os.system('docker image prune -f') os.system('docker image prune -fa')