2022-02-26 12:14:35 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
up () {
|
|
|
|
# Poll interval: 1800s (30 mins)
|
|
|
|
docker run \
|
|
|
|
--detach \
|
|
|
|
--name watchtower \
|
|
|
|
--volume /var/run/docker.sock:/var/run/docker.sock:rw \
|
2022-10-03 10:51:42 -04:00
|
|
|
ghcr.io/containrrr/watchtower:amd64-1.4.0 --interval 1800
|
2022-02-26 12:14:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
down () {
|
|
|
|
docker stop watchtower || true
|
|
|
|
docker rm watchtower || true
|
|
|
|
}
|
|
|
|
|
|
|
|
logs () {
|
|
|
|
docker logs --follow watchtower
|
|
|
|
}
|
|
|
|
|
|
|
|
$@
|