You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/container-selection.md
+40-16Lines changed: 40 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,29 +7,53 @@ There are two options:
7
7
8
8
## Full Exclude
9
9
10
-
If you need to exclude some containers, set the _com.centurylinklabs.watchtower.enable_ label to `false`.
10
+
If you need to exclude some containers, set the _com.centurylinklabs.watchtower.enable_ label to `false`. For clarity this should be set **on the container(s)** you wish to be ignored, this is not set on watchtower.
docker run -d --label=com.centurylinklabs.watchtower.enable=false someimage
20
-
```
19
+
```bash
20
+
docker run -d --label=com.centurylinklabs.watchtower.enable=false someimage
21
+
```
21
22
22
-
If you need to [include only containers with the enable label](https://containrrr.github.io/watchtower/arguments/#filter_by_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.
Or, it can be specified as part of the `docker run` command line:
34
+
If instead you want to [only include containers with the enable label](https://containrrr.github.io/watchtower/arguments/#filter_by_enable_label), pass the `--label-enable` flag or the `WATCHTOWER_LABEL_ENABLE` environment variable on startup for watchtower and set the _com.centurylinklabs.watchtower.enable_ label with a value of `true` on the containers you want to watch.
29
35
30
-
```bash
31
-
docker run -d --label=com.centurylinklabs.watchtower.enable=true someimage
docker run -d --label=com.centurylinklabs.watchtower.enable=true someimage
45
+
```
46
+
47
+
=== "docker-compose"
48
+
49
+
``` yaml
50
+
version: "3"
51
+
services:
52
+
someimage:
53
+
container_name: someimage
54
+
labels:
55
+
- "com.centurylinklabs.watchtower.enable=true"
56
+
```
33
57
34
58
If you wish to create a monitoring scope, you will need to [run multiple instances and set a scope for each of them](https://containrrr.github.io/watchtower/running-multiple-instances).
0 commit comments