Updating docker containers is as easy as pulling the image and drop and re-create the container. This can be automated using watchtower appliance, hosted in a docker container itself.
Watchtower is a process for watching your Docker containers and automatically restarting them whenever their base image is refreshed.
The image is named: centurylink/watchtower
I’ve set my instance to only match once a day, with a schedule set to every 23h. It will also ensure old image versions are pruned.
The docker.sock export is neccessary since we need to control docker.
Watchtower will periodically check the repos for updates and upgrade when neccessary, pruning old image versions when upgrade completes.
This will also update the Watchtower image.