25 lines
401 B
Bash
Executable File
25 lines
401 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
up () {
|
|
# Poll interval: 1800s (30 mins)
|
|
docker run \
|
|
--detach \
|
|
--name watchtower \
|
|
--restart unless-stopped \
|
|
--volume /var/run/docker.sock:/var/run/docker.sock:rw \
|
|
ghcr.io/containrrr/watchtower:amd64-1.7.1 --interval 1800
|
|
}
|
|
|
|
down () {
|
|
docker stop watchtower || true
|
|
docker rm watchtower || true
|
|
}
|
|
|
|
logs () {
|
|
docker logs --follow watchtower
|
|
}
|
|
|
|
$@
|