With watchtower you can update the running version of your containerized app simply by pushing a new image to the Docker Hub or your own image registry.
Watchtower will pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially. Run the watchtower container with the following command:
$ docker run --detach \
--name watchtower \
--volume /var/run/docker.sock:/var/run/docker.sock \
nickfedor/watchtower
Watchtower is intended to be used in homelabs, media centers, local dev environments, and similar. We do not recommend using Watchtower in a commercial or production environment. If that is you, you should be looking into using Kubernetes enabled with CI/CD, such as onedr0p's Talos Linux with FluxCD setup here.
docker version
.
This will impact your ability to utilize more advanced Docker features, such as IPAM and static MAC address management, which require using version 1.44 or greater.
Manually setting the DOCKER_API_VERSION
variable is recommended until you are able to update to Docker version 25 or newer.
The full documentation is available at https://nicholas-fedor.github.io/watchtower/.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!