docker run --rm --name watchtower -v /var/run/docker.sock:/var/run/docker.sock pqguanyinli/watchtower:latest-dev --include-stopped --cleanup --run-once 容器1 容器2 容器3 ...
--remove-volumes #清理匿名卷
--cleanup #清理标签为none的镜像,可以简写为 -c
--run-once #只运行一次,可以简写为 -R
--include-stopped #包含停止状态的容器,这样就不必在每次更新的时候要先把容器打开了
--revive-stopped #只能在上一个指令使用以后才可以使用,表示将未启用的容器更新后自动启动
--interval \<seconds> #设置 Watchtower 轮询检查更新的时间间隔,默认是 300 秒。简写为 -i
--schedule "0 0 2 * * *" #设置定时检测更新时间,可简写为-s。比如每天凌晨2点检查一次更新:--schedule "0 0 2 * * *"
--monitor-only #将仅监控新镜像并发送通知,不会更新容器。
--label-enable #仅更新容器中加入“--label com.centurylinklabs.watchtower.enable=true”参数的容器,可简写为-e
--no-pull #禁止 Watchtower 拉取新的镜像
--no-restart #禁止 Watchtower 重启容器
docker run --rm --name watchtower -v /var/run/docker.sock:/var/run/docker.sock pqguanyinli/watchtower:latest-dev --include-stopped --cleanup --run-once navidrome xiaoya
Content type
Image
Digest
sha256:135de872d…
Size
10.4 MB
Last updated
about 1 year ago
docker pull pqguanyinli/watchtower:latest-dev