added cleanup to watchtower alias

This commit is contained in:
Brad 2024-03-24 13:51:57 -04:00
parent e457ffaf22
commit 08c8f0f23a

View File

@ -5,7 +5,7 @@ alias doco="$DOCKER_COMPOSE_COMMAND"
alias redoco="$DOCKER_COMPOSE_COMMAND down && $DOCKER_COMPOSE_COMMAND up -d"
alias redog="$DOCKER_COMPOSE_COMMAND down && $DOCKER_COMPOSE_COMMAND up -d; $DOCKER_COMPOSE_COMMAND logs -f"
alias dolog="$DOCKER_COMPOSE_COMMAND up -d; $DOCKER_COMPOSE_COMMAND logs -f"
alias watchtower="docker run -d --restart unless-stopped --name 'watch-$(date +%H%M)' -v /var/run/docker.sock:/var/run/docker.sock -v /etc/localtime:/etc/localtime:ro containrrr/watchtower "
alias watchtower="docker run -d --restart unless-stopped --name 'watch-$(date +%H%M)' -v /var/run/docker.sock:/var/run/docker.sock -v /etc/localtime:/etc/localtime:ro containrrr/watchtower --cleanup "
alias watchonce="docker run -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once"
alias onetower="docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once"
alias docport='docker container ls --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}" -a'