Homelab Troubleshooting

Tips on running a Linux server and docker.

User Tools

Site Tools


watchtower

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
watchtower [2021/09/12 09:59] – created alexk7110watchtower [2023/10/26 18:35] (current) – updated to docker compose alexk7110
Line 1: Line 1:
 ====== Watchtower Troubleshooting ====== ====== Watchtower Troubleshooting ======
 +Docker compose deployment
  
-Portainer deployment+Create a custom template on portainer or a docker-compose.yml
  
-1Create new container +The WATCHTOWER_CLEANUP environment variable will delete the images that have been updated and the WATCHTOWER_RUN_ONCE will run watchtower, perform the updates and exit, thus giving you control when you want them to happen
-2. name: watchtowerimage: containrrr/watchtower +  
-3. env: WATCHTOWER_RUN_ONCE=true +<code yaml> 
-4. vol: /var/run/docker.sock:/var/run/docker.sock +version"3" 
-5. hit "Deploy this container"+services: 
 +  watchtower
 +    image: containrrr/watchtower 
 +    container_namewatchtower 
 +    environment: 
 +      - WATCHTOWER_CLEANUP=true 
 +      - WATCHTOWER_RUN_ONCE=true 
 +    volumes: 
 +      - /var/run/docker.sock:/var/run/docker.sock 
 +      - /etc/localtime:/etc/localtime:ro 
 +</code>
  
-Run this whenever you are available to upgrade your containers. +Run this whenever you are available to upgrade your containers
 + 
 +It's wise to add the following label to your portainer or agent compose file so that watchtower only reports whether it needs update without updating it and disrupting the monitoring during the update. 
 + 
 +<code yaml> 
 +version: "3.3" 
 +services: 
 +  portainer: 
 +    image: portainer/portainer-ce 
 +    container_name: portainer 
 +    labels: 
 +      - com.centurylinklabs.watchtower.monitor-only=true 
 +</code> 
 +Note that the version has to be 3.3 and up.
watchtower.1631429963.txt.gz · Last modified: 2021/09/12 09:59 by alexk7110