| Variable | Default | Description |
|---|---|---|
PORT |
8080 |
HTTP listen port for web UI and API |
DOCKER_SOCK |
/var/run/docker.sock |
Unix socket path used for Docker Engine API |
CHECK_INTERVAL |
10m |
Interval for background digest check loop |
CHECK_CONCURRENCY |
5 |
Max concurrent registry requests during check |
AUTO_COOLDOWN |
5m |
Cooldown window between auto-updates for same container |
- Read in
main.go - When both set, enables HMAC-signed session auth with login page
- Unauthenticated requests to API return 401
- Login brute-force rate-limited: 5 failures/min → 30s block
- Read in
main.goviagetEnvDuration - Defaults to
10m(10 minutes) - Controls how often the background goroutine checks all running containers against registry
- Read in
main.goviaos.Getenv - Defaults to
5 - Caps parallel registry manifest requests during a check cycle
- Read in
main.goviagetEnvDuration - Defaults to
5m(5 minutes) - Prevents repeated auto-updates for the same container within the window
- Read in
main.go - Defaults to
8080 - Exposed as container port
8080inDockerfile - Common deployment maps host port
8099to container port8080
- Read during process init in
docker.go - Defaults to
/var/run/docker.sock - Useful for custom Unix socket paths or rootless Docker setups where socket lives elsewhere
- Compose file passes
DOCKER_SOCK=/var/run/docker.sockexplicitly
- Read in
main.goviagetEnvDuration - Defaults to
5m(5 minutes) - Prevents repeated auto-updates for the same container within the window
Auto-update is enabled via the Docker label image-watch.auto-update on the container:
services:
my-service:
labels:
- "image-watch.auto-update=true"This label survives recreate because recreateContainer() copies labels from the old container. See AUTO-UPDATE.md for details.
Current docker-compose.yml:
- publishes
8099:8080 - mounts Docker socket at
/var/run/docker.sock - sets
PORTandDOCKER_SOCK
Example:
services:
image-watch:
image: ghcr.io/redenfire/docker-image-watcher:latest
container_name: image-watch
restart: unless-stopped
ports:
- "8099:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- PORT=8080
- DOCKER_SOCK=/var/run/docker.sock/var/run/docker.sock:/var/run/docker.sock
Required so Image Watch can:
- list running containers
- inspect container config
- pull images
- stop/remove/create/start containers
The previous image-watch-data:/data data volume is no longer needed since auto-update state is read from Docker labels, not from a file.
- Public images typically need no extra config.
- Private registries depend on Docker daemon auth state.
- If host can already
docker pullprivate image successfully, Image Watch usually inherits that access because pull happens through Docker Engine.