mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
fix format
This commit is contained in:
parent
22dc77efb2
commit
f47dbfed49
1 changed files with 164 additions and 137 deletions
301
README.md
301
README.md
|
@ -40,6 +40,38 @@
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [Overview](#overview)
|
||||||
|
- [Usage](#usage)
|
||||||
|
- [Arguments](#arguments)
|
||||||
|
- [Available Options](#available-options)
|
||||||
|
* [Help](#help)
|
||||||
|
* [Cleanup](#cleanup)
|
||||||
|
* [Debug](#debug)
|
||||||
|
* [Docker host](#docker-host)
|
||||||
|
* [Include stopped](#include-stopped)
|
||||||
|
* [Poll Interval](#poll-interval)
|
||||||
|
* [Filter by enable label](#filter-by-enable-label)
|
||||||
|
* [Without updating containers](#without-updating-containers)
|
||||||
|
* [Without pulling new images](#without-pulling-new-images)
|
||||||
|
* [Run once](#run-once)
|
||||||
|
* [Scheduling](#scheduling)
|
||||||
|
* [Wait until timeout](#wait-until-timeout)
|
||||||
|
* [TLS Verification](#tls-verification)
|
||||||
|
- [Linked Containers](#linked-containers)
|
||||||
|
- [Stopping Containers](#stopping-containers)
|
||||||
|
- [Selectively Watching Containers](#selectively-watching-containers)
|
||||||
|
- [Remote Hosts](#remote-hosts)
|
||||||
|
* [Secure Connections](#secure-connections)
|
||||||
|
- [Updating Watchtower](#updating-watchtower)
|
||||||
|
- [Notifications](#notifications)
|
||||||
|
* [Settings](#settings)
|
||||||
|
* [Notifications via E-Mail](#notifications-via-e-mail)
|
||||||
|
* [Notifications through Slack webhook](#notifications-through-slack-webhook)
|
||||||
|
* [Notifications via MSTeams incoming webhook](#notifications-via-msteams-incoming-webhook)
|
||||||
|
- [Contributors](#contributors)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Watchtower is an application that will monitor your running Docker containers and watch for changes to the images that those containers were originally started from. If watchtower detects that an image has changed, it will automatically restart the container using the new image.
|
Watchtower is an application that will monitor your running Docker containers and watch for changes to the images that those containers were originally started from. If watchtower detects that an image has changed, it will automatically restart the container using the new image.
|
||||||
|
@ -116,7 +148,7 @@ services:
|
||||||
command: --interval 30
|
command: --interval 30
|
||||||
```
|
```
|
||||||
|
|
||||||
### Arguments
|
## Arguments
|
||||||
|
|
||||||
By default, watchtower will monitor all containers running within the Docker daemon to which it is pointed (in most cases this will be the local Docker daemon, but you can override it with the `--host` option described in the next section). However, you can restrict watchtower to monitoring a subset of the running containers by specifying the container names as arguments when launching watchtower.
|
By default, watchtower will monitor all containers running within the Docker daemon to which it is pointed (in most cases this will be the local Docker daemon, but you can override it with the `--host` option described in the next section). However, you can restrict watchtower to monitoring a subset of the running containers by specifying the container names as arguments when launching watchtower.
|
||||||
|
|
||||||
|
@ -141,7 +173,7 @@ In the example above, watchtower will execute an upgrade attempt on the containe
|
||||||
|
|
||||||
When no arguments are specified, watchtower will monitor all running containers.
|
When no arguments are specified, watchtower will monitor all running containers.
|
||||||
|
|
||||||
### Options
|
## Available options
|
||||||
|
|
||||||
Any of the options described below can be passed to the watchtower process by setting them after the image name in the `docker run` string, for example:
|
Any of the options described below can be passed to the watchtower process by setting them after the image name in the `docker run` string, for example:
|
||||||
|
|
||||||
|
@ -149,143 +181,138 @@ Any of the options described below can be passed to the watchtower process by se
|
||||||
docker run --rm containrrr/watchtower --help
|
docker run --rm containrrr/watchtower --help
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Help
|
||||||
|
Shows documentation about the supported flags.
|
||||||
|
|
||||||
#### Help
|
```
|
||||||
|
Argument: --help
|
||||||
|
Environment Variable: N/A
|
||||||
|
Type: N/A
|
||||||
|
Default: N/A
|
||||||
|
```
|
||||||
|
|
||||||
<table width="100%">
|
### Cleanup
|
||||||
<thead>
|
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.
|
||||||
<tr>
|
|
||||||
<th>Argument</th>
|
```
|
||||||
<th>Environment Variable</th>
|
Argument: --cleanup
|
||||||
<th>Type</th>
|
Environment Variable: WATCHTOWER_CLEANUP
|
||||||
<th>Default</th>
|
Type: Boolean
|
||||||
<th>Description</th>
|
Default: false
|
||||||
</tr>
|
```
|
||||||
</thead>
|
|
||||||
<tbody>
|
### Debug
|
||||||
<tr>
|
Enable debug mode with verbose logging.
|
||||||
<td>--help</td>
|
|
||||||
<td>-</td>
|
```
|
||||||
<td>-</td>
|
Argument: --debug
|
||||||
<td>-</td>
|
Environment Variable: N/A
|
||||||
<td>Shows documentation about the supported flags</td>
|
Type: Boolean
|
||||||
</tr>
|
Default: false
|
||||||
<tr>
|
```
|
||||||
<td>--cleanup</td>
|
|
||||||
<td>WATCHTOWER_CLEANUP</td>
|
### Docker host
|
||||||
<td>Boolean</td>
|
Docker daemon socket to connect to. Can be pointed at a remote Docker host by specifying a TCP endpoint as "tcp://hostname:port".
|
||||||
<td>false</td>
|
|
||||||
<td>
|
```
|
||||||
Removes old images after updating. When this flag is specified, watchtower will remove the old image after
|
Argument: --host, -h
|
||||||
restarting a container with a new image. Use this option to prevent the accumulation of orphaned images on
|
Environment Variable: DOCKER_HOST
|
||||||
your system as containers are updated.
|
Type: String
|
||||||
</td>
|
Default: "unix:///var/run/docker.sock"
|
||||||
</tr>
|
```
|
||||||
<tr>
|
|
||||||
<td>--debug</td>
|
### Include stopped
|
||||||
<td>-</td>
|
Will also include created and exited containers.
|
||||||
<td>Boolean</td>
|
|
||||||
<td>false</td>
|
```
|
||||||
<td>
|
Argument: --include-stopped
|
||||||
Enable debug mode with verbose logging.
|
Environment Variable: WATCHTOWER_INCLUDE_STOPPED
|
||||||
</td>
|
Type: Boolean
|
||||||
</tr>
|
Default: false
|
||||||
<tr>
|
```
|
||||||
<td>--host, -h</td>
|
|
||||||
<td>DOCKER_HOST</td>
|
### Poll Interval
|
||||||
<td>String</td>
|
Poll interval (in seconds). This value controls how frequently watchtower will poll for new images.
|
||||||
<td>"unix:///var/run/docker.sock"</td>
|
|
||||||
<td>
|
```
|
||||||
Docker daemon socket to connect to. Can be pointed at a remote Docker host by specifying a TCP endpoint
|
Argument: ---interval, -i
|
||||||
as "tcp://hostname:port".
|
Environment Variable: WATCHTOWER_POLL_INTERVAL
|
||||||
</td>
|
Type: Integer
|
||||||
</tr>
|
Default: 300
|
||||||
<tr>
|
```
|
||||||
<td>--include-stopped</td>
|
|
||||||
<td>WATCHTOWER_INCLUDE_STOPPED</td>
|
### Filter by enable label
|
||||||
<td>Boolean</td>
|
Watch containers where the `com.centurylinklabs.watchtower.enable` label is set to true.
|
||||||
<td>false</td>
|
|
||||||
<td>
|
```
|
||||||
Will also include created and exited containers.
|
Argument: --label-enable
|
||||||
</td>
|
Environment Variable: WATCHTOWER_LABEL_ENABLE
|
||||||
</tr>
|
Type: Boolean
|
||||||
<tr>
|
Default: false
|
||||||
<td>---interval, -i</td>
|
```
|
||||||
<td>WATCHTOWER_POLL_INTERVAL</td>
|
|
||||||
<td>Integer</td>
|
### Without updating containers
|
||||||
<td>300</td>
|
Will only monitor for new images, not update the containers.
|
||||||
<td>
|
|
||||||
Poll interval (in seconds). This value controls how frequently watchtower will poll for new images.
|
```
|
||||||
</td>
|
Argument: --monitor-only
|
||||||
</tr>
|
Environment Variable: WATCHTOWER_MONITOR_ONLY
|
||||||
<tr>
|
Type: Boolean
|
||||||
<td>--label-enable</td>
|
Default: false
|
||||||
<td>WATCHTOWER_LABEL_ENABLE</td>
|
```
|
||||||
<td>Boolean</td>
|
|
||||||
<td>False</td>
|
### Without pulling new images
|
||||||
<td>
|
Do not pull new images. When this flag is specified, watchtower will not attempt to pull
|
||||||
Watch containers where the `com.centurylinklabs.watchtower.enable` label is set to true.
|
new images from the registry. Instead it will only monitor the local image cache for changes.
|
||||||
</td>
|
Use this option if you are building new images directly on the Docker host without pushing
|
||||||
</tr>
|
them to a registry.
|
||||||
<tr>
|
|
||||||
<td>--monitor-only</td>
|
```
|
||||||
<td>WATCHTOWER_MONITOR_ONLY</td>
|
Argument: --no-pull
|
||||||
<td>Boolean</td>
|
Environment Variable: WATCHTOWER_NO_PULL
|
||||||
<td>False</td>
|
Type: Boolean
|
||||||
<td>
|
Default: false
|
||||||
Will only monitor for new images, not update the containers.
|
```
|
||||||
</td>
|
|
||||||
</tr>
|
### Run once
|
||||||
<tr>
|
Run an update attempt against a container name list one time immediately and exit.
|
||||||
<td>--no-pull</td>
|
|
||||||
<td>WATCHTOWER_NO_PULL</td>
|
```
|
||||||
<td>Boolean</td>
|
Argument: --run-once
|
||||||
<td>False</td>
|
Environment Variable: WATCHTOWER_RUN_ONCE
|
||||||
<td>
|
Type: Boolean
|
||||||
Do not pull new images. When this flag is specified, watchtower will not attempt to pull
|
Default: false
|
||||||
new images from the registry. Instead it will only monitor the local image cache for changes.
|
```
|
||||||
Use this option if you are building new images directly on the Docker host without pushing
|
|
||||||
them to a registry.
|
### Scheduling
|
||||||
</td>
|
[Cron expression](https://godoc.org/github.com/robfig/cron#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 could be defined, but not both. An example: `--schedule "0 0 4 * * *"`
|
||||||
</tr>
|
|
||||||
<tr>
|
```
|
||||||
<td>--run-once</td>
|
Argument: --schedule, -s
|
||||||
<td>WATCHTOWER_RUN_ONCE</td>
|
Environment Variable: WATCHTOWER_SCHEDULE
|
||||||
<td>Boolean</td>
|
Type: String
|
||||||
<td>False</td>
|
Default: -
|
||||||
<td>
|
```
|
||||||
Run an update attempt against a container name list one time immediately and exit.
|
|
||||||
</td>
|
### Wait until timeout
|
||||||
</tr>
|
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.
|
||||||
<tr>
|
|
||||||
<td>--schedule, -s</td>
|
```
|
||||||
<td>WATCHTOWER_SCHEDULE</td>
|
Argument: --stop-timeout
|
||||||
<td>String</td>
|
Environment Variable: WATCHTOWER_TIMEOUT
|
||||||
<td>-</td>
|
Type: Duration
|
||||||
<td>
|
Default: 10s
|
||||||
[Cron expression](https://godoc.org/github.com/robfig/cron#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 could be defined, but not both. An example: `--schedule "0 0 4 * * *"`
|
```
|
||||||
</td>
|
|
||||||
</tr>
|
### TLS Verification
|
||||||
<tr>
|
Use TLS when connecting to the Docker socket and verify the server's certificate. See below for options used to configure notifications.
|
||||||
<td>--stop-timeout</td>
|
|
||||||
<td>WATCHTOWER_TIMEOUT</td>
|
```
|
||||||
<td>Duration</td>
|
Argument: --tlsverify
|
||||||
<td>10s</td>
|
Environment Variable: DOCKER_TLS_VERIFY
|
||||||
<td>
|
Type: Boolean
|
||||||
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.
|
Default: false
|
||||||
</td>
|
```
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>--tlsverify</td>
|
|
||||||
<td>DOCKER_TLS_VERIFY</td>
|
|
||||||
<td>Boolean</td>
|
|
||||||
<td>false</td>
|
|
||||||
<td>
|
|
||||||
Use TLS when connecting to the Docker socket and verify the server's certificate. See below for options used to configure notifications.
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
## Linked Containers
|
## Linked Containers
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue