Watchtower is a method to automatically and gracefully update the image running for an existing container.
Docker Image is from containrrr, found here.
- Setup notifications
For my purposes, I will be using Discord as my method of notification, as this is my personal server. It's not entirely documented within Watchtower's documentation of notifications, but is explained here in a GitHub discussion thread.
Thus, we will need to create an .env
file with:
DISCORD_TOKEN=<some token>
DISCORD_ID=<some id>
For other notification methods, please follow the documentation and change both .env
and docker-compose.yml
as needed.
Note
This step is entirely optional, and can be skipped. Simply comment out WATCHTOWER_NOTIFICATIONS_LEVEL, WATCHTOWER_NOTIFICATION_URL, and WATCHTOWER_NOTIFICATION_TEMPLATE under environment for docker-compose.yml
- Run it!
docker-compose up -d
This container will have its image automatically updated via watchtower.
N/A