A process for automating Docker container base image updates.
| Argument | Environment Variable | Type | Default | Description |
|---|---|---|---|---|
| --help | - | - | - | Shows documentation about the supported flags |
| --cleanup | WATCHTOWER_CLEANUP | Boolean | false | 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. |
| --debug | - | Boolean | false | Enable debug mode with verbose logging. |
| --host, -h | DOCKER_HOST | String | "unix:///var/run/docker.sock" | Docker daemon socket to connect to. Can be pointed at a remote Docker host by specifying a TCP endpoint as "tcp://hostname:port". |
| --include-stopped | WATCHTOWER_INCLUDE_STOPPED | Boolean | false | Will also include created and exited containers. |
| ---interval, -i | WATCHTOWER_POLL_INTERVAL | Integer | 300 | Poll interval (in seconds). This value controls how frequently watchtower will poll for new images. |
| --label-enable | WATCHTOWER_LABEL_ENABLE | Boolean | False | Watch containers where the `com.centurylinklabs.watchtower.enable` label is set to true. |
| --monitor-only | WATCHTOWER_MONITOR_ONLY | Boolean | False | Will only monitor for new images, not update the containers. |
| --no-pull | WATCHTOWER_NO_PULL | Boolean | False | Do not pull new images. When this flag is specified, watchtower will not attempt to pull 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. |
| --run-once | WATCHTOWER_RUN_ONCE | Boolean | False | Run an update attempt against a container name list one time immediately and exit. |
| --schedule, -s | WATCHTOWER_SCHEDULE | String | - | [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 * * *"` |
| --stop-timeout | WATCHTOWER_TIMEOUT | Duration | 10s | 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. |
| --tlsverify | DOCKER_TLS_VERIFY | Boolean | false | Use TLS when connecting to the Docker socket and verify the server's certificate. See below for options used to configure notifications. |