scripts/lech/docker/watchtower.sh

24 lines
370 B
Bash
Raw Normal View History

2023-09-05 11:40:31 -04: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 \
2023-12-02 09:44:19 -05:00
ghcr.io/containrrr/watchtower:amd64-1.7.1 --interval 1800
2023-09-05 11:40:31 -04:00
}
down () {
docker stop watchtower || true
docker rm watchtower || true
}
logs () {
docker logs --follow watchtower
}
$@