A lightweight Docker container that monitors your running containers for image updates and automatically pulls and recreates them when a newer image is available on the registry.
Docker Hub: samuelstreets/docker-updaterโ
services:
docker-autoupdater:
image: samuelstreets/docker-updater:latest
container_name: docker-autoupdater
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
CHECK_INTERVAL_MINUTES: "60"
AUTO_UPDATE: "true"
By default all running containers are checked. To restrict to specific containers, add the LABEL_ENABLE option (see Configurationโ ) and label your services:
nginx:
image: nginx:latest
labels:
autoupdate: "true"
docker run -d \
--name docker-autoupdater \
--restart unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-e CHECK_INTERVAL_MINUTES=60 \
-e AUTO_UPDATE=true \
samuelstreets/docker-updater:latest
git clone https://github.com/samuelstreets/docker-updater
cd docker-updater
docker build -t docker-updater .
docker run -d \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
docker-updater
All configuration is done via environment variables:
| Variable | Default | Description |
|---|---|---|
CHECK_INTERVAL_MINUTES | 60 | How often to check for updates. Set to 0 to run once and exit. |
AUTO_UPDATE | true | true = pull + recreate containers. false = notify only. |
LABEL_ENABLE | (empty) | Only manage containers with this label (e.g. autoupdate=true). Leave empty to check all running containers. |
DRY_RUN | false | Simulate updates without making any changes. |
NOTIFY_WEBHOOK | (empty) | POST notifications here (Discord, Slack, Gotify webhook URL). |
LOG_LEVEL | INFO | Log verbosity: DEBUG, INFO, WARNING, ERROR. |
docker manifest inspect โ no unnecessary full pullsThe updater preserves environment variables, port bindings, volumes, network mode, and restart policy when recreating containers.
Set NOTIFY_WEBHOOK to any HTTP endpoint and the updater will POST on update success or failure:
{ "content": "โ
Updated Docker container `my-nginx` (nginx:latest)", "text": "..." }
This format works out of the box with Discord webhooks. For Slack, use an Incoming Webhook URL โ Slack picks up the text field automatically.
By default all running containers are checked. To opt specific containers in instead, set LABEL_ENABLE:
LABEL_ENABLE: "autoupdate=true"
Then label only the containers you want managed:
Docker Compose:
labels:
autoupdate: "true"
Docker Run:
docker run --label autoupdate=true ...
/var/run/docker.sock โ only deploy in trusted environments.MIT
Content type
Image
Digest
sha256:f7247f606โฆ
Size
45.8 MB
Last updated
3 days ago
docker pull samuelstreets/docker-updater