Skip to content

Automatic Updates

Use watchtower to periodically pull and restart containers when newer images are available.

Add this service to your existing docker-compose.yml:

services:
watchtower:
image: containrrr/watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
# Optional for private registries only:
# - "${HOME}/.docker/config.json:/config.json:ro"
command: --cleanup --interval 7200 html2rss-web browserless caddy

Then restart the stack:

Terminal window
docker compose up -d

Operational note:

  • Keep the Docker socket mount (read-only in this example).
  • Add the optional Docker config mount only if you pull private images that require registry auth.
  • The shown Watchtower command updates all running containers by default.
  • Check docker compose logs watchtower to confirm scans and update runs.