Pruning all unused docker images

This commit is contained in:
2023-09-21 17:36:58 +02:00
parent c3e4b04f20
commit 56f303cce7
2 changed files with 4 additions and 0 deletions

View File

@@ -5,6 +5,8 @@ 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
You can then simply execute:
python main.py

View File

@@ -28,3 +28,5 @@ if __name__ == '__main__':
for s in stack_list:
if s['Status'] == 1:
update_stack(s)
os.system('docker image prune -f')