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/arguments.md
+55-35Lines changed: 55 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ When no arguments are specified, watchtower will monitor all running containers.
30
30
## Help
31
31
Shows documentation about the supported flags.
32
32
33
-
```
33
+
```text
34
34
Argument: --help
35
35
Environment Variable: N/A
36
36
Type: N/A
@@ -41,7 +41,7 @@ Environment Variable: N/A
41
41
Sets the time zone to be used by WatchTower's logs and the optional Cron scheduling argument (--schedule). If this environment variable is not set, Watchtower will use the default time zone: UTC.
42
42
To find out the right value, see [this list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), find your location and use the value in _TZ Database Name_, e.g _Europe/Rome_. The timezone can alternatively be set by volume mounting your hosts /etc/localtime file. `-v /etc/localtime:/etc/localtime:ro`
43
43
44
-
```
44
+
```text
45
45
Argument: N/A
46
46
Environment Variable: TZ
47
47
Type: String
@@ -51,7 +51,7 @@ Environment Variable: TZ
51
51
## Cleanup
52
52
Removes old images after updating. When this flag is specified, watchtower will remove the old image after restarting a container with a new image. Use this option to prevent the accumulation of orphaned images on your system as containers are updated.
Removes attached volumes after updating. When this flag is specified, watchtower will remove all attached volumes from the container before restarting with a new image. Use this option to force new volumes to be populated as containers are updated.
Poll interval (in seconds). This value controls how frequently watchtower will poll for new images. Either `--schedule` or a poll interval can be defined, but not both.
Update containers that have a `com.centurylinklabs.watchtower.enable` label set to true.
163
163
164
-
```
164
+
```text
165
165
Argument: --label-enable
166
166
Environment Variable: WATCHTOWER_LABEL_ENABLE
167
167
Type: Boolean
168
168
Default: false
169
169
```
170
170
171
171
## Filter by disable label
172
-
**Do not** update containers that have `com.centurylinklabs.watchtower.enable` label set to false and no `--label-enable` argument is passed. Note that only one or the other (targeting by enable label) can be used at the same time to target containers.
172
+
__Do not__ update containers that have `com.centurylinklabs.watchtower.enable` label set to false and
173
+
no `--label-enable` argument is passed. Note that only one or the other (targeting by enable label) can be
174
+
used at the same time to target containers.
173
175
174
176
## Without updating containers
175
-
Will only monitor for new images, send notifications and invoke the [pre-check/post-check hooks](https://containrrr.dev/watchtower/lifecycle-hooks/), but will **not** update the containers.
177
+
Will only monitor for new images, send notifications and invoke
178
+
the [pre-check/post-check hooks](https://containrrr.dev/watchtower/lifecycle-hooks/), but will __not__ update the
179
+
containers.
176
180
177
-
> **⚠️ Please note**
178
-
>
179
-
> Due to Docker API limitations the latest image will still be pulled from the registry.
181
+
!!! note Due to Docker API limitations the latest image will still be pulled from the registry.
182
+
The HEAD digest checks allows watchtower to skip pulling when there are no changes, but to know _what_ has changed it
183
+
will still do a pull whenever the repository digest doesn't match the local image digest.
180
184
181
-
```
185
+
```text
182
186
Argument: --monitor-only
183
187
Environment Variable: WATCHTOWER_MONITOR_ONLY
184
188
Type: Boolean
@@ -190,7 +194,7 @@ Note that monitor-only can also be specified on a per-container basis with the `
190
194
## Without restarting containers
191
195
Do not restart containers after updating. This option can be useful when the start of the containers
192
196
is managed by an external system such as systemd.
193
-
```
197
+
```text
194
198
Argument: --no-restart
195
199
Environment Variable: WATCHTOWER_NO_RESTART
196
200
Type: Boolean
@@ -203,7 +207,7 @@ new images from the registry. Instead it will only monitor the local image cache
203
207
Use this option if you are building new images directly on the Docker host without pushing
Run an update attempt against a container name list one time immediately and exit.
225
229
226
-
```
230
+
```text
227
231
Argument: --run-once
228
232
Environment Variable: WATCHTOWER_RUN_ONCE
229
233
Type: Boolean
230
234
Default: false
231
235
```
232
236
233
237
## HTTP API Mode
234
-
Runs Watchtower in HTTP API mode, only allowing image updates to be triggered by an HTTP request. For details see [HTTP API](https://containrrr.github.io/watchtower/http-api-mode).
238
+
Runs Watchtower in HTTP API mode, only allowing image updates to be triggered by an HTTP request.
239
+
For details see [HTTP API](https://containrrr.github.io/watchtower/http-api-mode).
Sets an authentication token to HTTP API requests.
245
250
246
-
```
251
+
```text
247
252
Argument: --http-api-token
248
253
Environment Variable: WATCHTOWER_HTTP_API_TOKEN
249
254
Type: String
250
255
Default: -
251
256
```
252
257
253
258
## Filter by scope
254
-
Update containers that have a `com.centurylinklabs.watchtower.scope` label set with the same value as the given argument. This enables [running multiple instances](https://containrrr.github.io/watchtower/running-multiple-instances).
259
+
Update containers that have a `com.centurylinklabs.watchtower.scope` label set with the same value as the given argument.
260
+
This enables [running multiple instances](https://containrrr.github.io/watchtower/running-multiple-instances).
[Cron expression](https://pkg.go.dev/github.com/robfig/[email protected]?tab=doc#hdr-CRON_Expression_Format) in 6 fields (rather than the traditional 5) which defines when and how often to check for new images. Either `--interval` or the schedule expression
275
281
can be defined, but not both. An example: `--schedule "0 0 4 * * *"`
Timeout before the container is forcefully stopped. When set, this option will change the default (`10s`) wait time to the given value. An example: `--stop-timeout 30s` will set the timeout to 30 seconds.
297
303
298
-
```
304
+
```text
299
305
Argument: --stop-timeout
300
306
Environment Variable: WATCHTOWER_TIMEOUT
301
307
Type: Duration
302
308
Default: 10s
303
309
```
304
310
305
311
## TLS Verification
306
-
Use TLS when connecting to the Docker socket and verify the server's certificate. See below for options used to configure notifications.
307
312
308
-
```
313
+
Use TLS when connecting to the Docker socket and verify the server's certificate. See below for options used to
314
+
configure notifications.
315
+
316
+
```text
309
317
Argument: --tlsverify
310
318
Environment Variable: DOCKER_TLS_VERIFY
311
319
Type: Boolean
312
320
Default: false
313
321
```
322
+
323
+
## HEAD failure warnings
324
+
325
+
When to warn about HEAD pull requests failing. Auto means that it will warn when the registry is known to handle the
326
+
requests and may rate limit pull requests (mainly docker.io).
With watchtower you can update the running version of your containerized app simply by pushing a new image to the Docker Hub or your own image registry. Watchtower will pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially. Run the watchtower container with the following command:
45
+
With watchtower you can update the running version of your containerized app simply by pushing a new image to the Docker
46
+
Hub or your own image registry. Watchtower will pull down your new image, gracefully shut down your existing container
47
+
and restart it with the same options that were used when it was deployed initially. Run the watchtower container with
0 commit comments