Deploy Watchtower in Docker

Watchtower is an application that will monitor your running Docker containers and watch for changes to the images that those containers were originally started from. If watchtower detects that an image has changed, it will automatically restart the container using the new image.

  • A 16 megabyte limit is set on the container, in this instance.
  • I’ve added a hostname for this container because Watchtower sends emails with the hostname of the Watchtower Docker container in the subject line.  By setting my own hostname instead of the default Docker generated hostname, I can glance at the email and see which of my hosts containers have just been updated.
  • Email notifications are configured using the container environment variables using the -e flags.  These can be omitted if you don’t want any notifications.

Leave a Reply

Your email address will not be published. Required fields are marked *