Revive automatically monitors all stopped Docker containers on your host and restarts them. Perfect for ensuring critical services always stay running.
- Minimal, multi-architecture container (~37 MB)
- Monitors all containers with status
exited - Automatically restarts stopped containers
- Logs only on restarts, with date & time
- Built-in healthcheck
- Multi-arch support:
amd64,arm64,arm/v7 - Configurable check interval via environment variable
docker run -d \
--name revive \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
-e REVIVE_INTERVAL=60 \
boingbasti/revive:latestREVIVE_INTERVAL– interval in seconds to check for stopped containers (default: 60s)
version: "3.9"
services:
revive:
image: boingbasti/revive:latest
container_name: docker-revive
restart: always
environment:
- REVIVE_INTERVAL=60
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
healthcheck:
test: ["CMD", "pgrep", "-f", "/usr/local/bin/revive.sh"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s- Logs are printed only when a stopped container is restarted
- Timestamps in format
YYYY-MM-DD HH:MM:SS
- MIT License, open source