Linux
With Watchtower you can easily update your Docker container on Linux.
Download and installation
Execute this command in the cmd:
$ docker run -d \ --name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtower
Windows
With Watchtower you can easily update your Docker container on Windows.
Download and installation
nssm:
With chocolatey
- Open Powershell
- Install chocolatey with this command:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- Restart Powershell
- Install nssm with this command:
choco install nssm -y
3. Restart Powershell
Without Chocolatey
Download- Unpack ZIP
- Go to the Folder with the nssm.exe and type cmd in the folder adressbar
Watchtower:
Download the latest watchtower_windows_xxx.zip file from the Watchtower git site.
DownloadReplace "C:\folder\watchtower.exe" with the file path from the unpacked Watchtower ZIP file.
nssm.exe install Watchtower C:\folder\watchtower.exe
nssm.exe set Watchtower AppParameters ^"-H npipe:////./pipe/docker_engine -s ^\^"* 18 * * 1-5^\^"^"
nssm.exe set Watchtower AppDirectory C:\folder
nssm.exe set Watchtower AppExit Default Restart
nssm.exe set Watchtower AppStdout C:\folder\watchtower.log
nssm.exe set Watchtower AppStderr C:\folder\watchtower.log
nssm.exe set Watchtower Description "Container auto updater (Watchtower)"
nssm.exe set Watchtower DisplayName Watchtower
nssm.exe set Watchtower ObjectName LocalSystem
nssm.exe set Watchtower Start SERVICE_AUTO_START
nssm.exe set Watchtower Type SERVICE_WIN32_OWN_PROCESS