diff --git a/README.md b/README.md index 8b3002b..b43f9e0 100644 --- a/README.md +++ b/README.md @@ -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 \ No newline at end of file diff --git a/main.py b/main.py index af61b75..930de35 100644 --- a/main.py +++ b/main.py @@ -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')