1.7 KiB
By default, watchtower will watch all containers. However, sometimes only some containers should be updated.
If you need to exclude some containers, set the com.centurylinklabs.watchtower.enable label to false.
LABEL com.centurylinklabs.watchtower.enable="false"
Or, it can be specified as part of the docker run command line:
docker run -d --label=com.centurylinklabs.watchtower.enable=false someimage
If you need to include only containers with the enable label, pass the --label-enable flag or the WATCHTOWER_LABEL_ENABLE environment variable on startup and set the com.centurylinklabs.watchtower.enable label with a value of true for the containers you want to watch.
LABEL com.centurylinklabs.watchtower.enable="true"
Or, it can be specified as part of the docker run command line:
docker run -d --label=com.centurylinklabs.watchtower.enable=true someimage
If you wish to create a monitoring scope, you will need to run multiple instances and set a scope for each of them.
Watchtower filters running containers by testing them against each configured criteria. A container is monitored if all criteria are met. For example:
- If a container's name is on the monitoring name list (not empty
--nameargument) but it is not enabled (centurylinklabs.watchtower.enable=false), it won't be monitored; - If a container's name is not on the monitoring name list (not empty
--nameargument), even if it is enabled (centurylinklabs.watchtower.enable=true and--label-enableflag is set), it won't be monitored;