MirrorNest
← Todas las guías

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.

Sistema: Any Docker hostUtilitiesDockerAutomationSitio oficial ↗Documentación oficial ↗
Esta guía se elaboró a partir de la documentación oficial de Watchtower, enlazada arriba — verifica siempre ahí los nombres exactos de paquetes/versiones antes de ejecutar estos comandos en un servidor de producción, ya que las versiones de la distribución y del proyecto cambian con el tiempo.
  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