Update all Docker Compose Stacks
How it works: searches for all running Docker Compose Stacks with docker compose ls
and pulls all new images and updates those stacks.
Note: This script was 100% generated by Gemini (Pro). I checked and tested it, but please do your own research before using it!
Prerequisites
- docker
- docker-compose
- jq
Note: tested on Debian 13
Install Script
Download the Script and make it excecutable:
wget -q -O update-docker-stacks.sh https://raw.githubusercontent.com/gaesteklo/gaesteklo.github.io/main/scripts/update-docker-stacks.sh &&
chmod +x update-docker-stacks.sh
Run Script
Optional: Run the script as a dry-run
./update-docker-stacks.sh --dry-run
Run the Script to update all stacks and prune unused images:
./update-docker-stacks.sh