
This tutorial explains how to install Watchtower on Ubuntu 20.04.
Watchtower will automatically keep all of your running Docker containers up to date. This can be useful if you run all of your self-hosted services or apps with Docker. Every few minutes, Watchtower will pull the latest image for your application and compare it to the one used to run the container. Suppose there are any changes to the image. In that case, Watchtower will automatically restart the container using the new image, and the same docker run or docker-compose configuration initially used to start it.
Before you begin, you should:
Ideally, you should already have Docker installed on your server, as you should already be using it. If you don't, you can install it by following these steps:
Remove any older versions of Docker and the Docker engine.
Install Docker using snap.
If you don't have a Docker container running, create one. As an example, you can use the Docker getting-started image.
To check if you have any existing running containers, you can run docker ps.
Create the Watchtower Docker container.
Check that Watchtower is running by using docker. The status should be Up.
You have now successfully installed and configured Watchtower to update your Docker container images regularly.
Watchtower has some additional configurations that can be changed using command line arguments.
You can set the timezone that Watchtower uses by mounting your host machine's /etc/localtime file into the container.
By default, Watchtower does not remove old images. Enabling this may be useful if you need to save disk space.
More Watchtower configuration options can be found in the documentation below.
0 Comments
Be the first to comment and share your perspective with the community.