MirrorNest
← すべてのガイド

Watchtower

A free, open-source tool that watches your running Docker containers and automatically pulls + restarts them when a new image version is published -- keeps self-hosted apps patched without manual `docker pull` runs.

対象: Any Docker hostUtilitiesDockerAutomation公式ホームページ ↗公式ドキュメント ↗
このガイドは上記リンク先にあるWatchtower公式ドキュメントをもとに作成されています。ディストリビューションやプロジェクトのバージョンは時間とともに変わるため、本番サーバーでこれらのコマンドを実行する前に、必ず公式ドキュメントで正確なパッケージ名・バージョン名を確認してください。
  1. 1Run Watchtower

    docker run -d \ --name watchtower \ --restart unless-stopped \ -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtower

    With no extra flags, Watchtower checks every running container every 24 hours and updates all of them -- see the next step to scope this down.

  2. 2Limit it to specific containers (recommended)

    Pass container names as arguments so only those get auto-updated -- safer than blanket-updating everything, especially anything with a database that needs a manual migration step on major version bumps.

    docker run -d \ --name watchtower \ --restart unless-stopped \ -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtower \ uptime-kuma portainer
  3. 3Set a custom check interval

    In seconds -- 3600 checks hourly instead of the 24-hour default.

    docker run -d ... containrrr/watchtower --interval 3600