Watchtower, container for updating docker images
Docker containers (update docker images using watchtower)
I found this interesting article here today and decide to implement it in my PHP project github repository
For those who already read my article, about some PHP8 new features implementation, the source code link is already available. You just need to update the repository.
git pull origin master
- Changes added
docker-composer.yml
services:
watchtower:
container_name: watchtower
hostname: watchtower
image: containrrr/watchtower:latest
restart: always
environment:
TZ: "Europe/Paris"
WATCHTOWER_CLEANUP: "true"
WATCHTOWER_NOTIFICATIONS: "slack"
WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL: "https://hooks.slack.com/services/XXX/YYY/ZZZ"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
....
Watchtower allows you to keep all your docker images up to date. it:
- Search for the newest versions of your docker images
- Update your current images and containers
- remove unused images
- send Slack notification
Enjoy <3 <3