workflowstacks
devtools

Watchtower: Auto Container Updates

Automate Docker base image updates with Watchtower. For founders, by developers with 25k+ GitHub stars.
24,698 stars1,146 forksGoHealth Score 9/10Updated 12/17/2025100% free · open source
What it does

Watchtower automates the process of updating Docker container base images to ensure they are running with the latest security patches and features.

Install / run
docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower
When to use it
  • Your Dockerized application requires frequent updates to ensure security and compatibility
  • You have a large number of Docker containers to manage and update manually
  • You need to automate the process of rebuilding and redeploying Docker images after a base image update
Quick start
  1. 1Pull the Watchtower Docker image using the command: docker pull containrrr/watchtower
  2. 2Run Watchtower as a Docker container with the command: docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower
  3. 3Configure Watchtower to scan for updates at regular intervals by using the --interval flag, for example: docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --interval 30m
  4. 4Specify which containers to update using the --label-enable flag, for example: docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --label-enable
  5. 5Verify Watchtower is running and updating containers as expected by checking the Docker logs: docker logs -f watchtower
Ready-to-paste prompt
docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --interval 1h --label-enable --repo user/app
Heads up: Watchtower requires access to the Docker socket (/var/run/docker.sock) to function, so ensure the container has the necessary permissions and volumes mounted
Saves to your device

Topics

automation
continuous-delivery
devops
docker
hacktoberfest
notifications
receive-notifications
registry
update-checker
watchtower
How Watchtower: Auto Container Updates works
Codeflow
Free to inspect

Watchtower: Auto Container Updates is a medium Go project (~8.3k lines across 96 code files). Setup is light: installs like a normal app. Reading the code is optional. Last commit 8 months ago, Apache-2.0 license, has a test suite.

Size
Medium codebase
~8.3k lines · 96 code files · ~1 h to skim
Setup
One-command install
Installs like a normal app. Reading the code is optional.
Runs on
Go · Docker
No API keys detected
Go 95%Shell 5%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    main.go
    Where the program starts running
  3. 3
    go.mod
    Dependencies and the commands it exposes
  4. 4
    pkg/api/api_test.go
    Inside pkg/ — the main logic begins here
What's in each folder
pkg/Core code — the actual logic81 files
internal/Core code — the actual logic14 files
cmd/Command-line entry points2 files
docs/Documentation21 files
scripts/Helper scripts7 files
dockerfiles/Folder4 files
grafana/Folder3 files
tplprev/Folder2 files
READMEHas testsDocumentedCI checksDocker readyApache-2.0 licenseLast update 8 mo agoArchived — read only
Quick Actions
Details
Creator
containrrr
Language
Go
Category
devtools
Published
7/13/2015

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.