From 22dc77efb27d057d600308ceccaf52c1cfad4a70 Mon Sep 17 00:00:00 2001 From: Simon Aronsson Date: Sat, 25 May 2019 13:46:41 +0200 Subject: [PATCH] Fix layout --- README.md | 154 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 138 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 007bf29..245111d 100644 --- a/README.md +++ b/README.md @@ -143,27 +143,149 @@ When no arguments are specified, watchtower will monitor all running containers. ### 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: +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: ```bash docker run --rm containrrr/watchtower --help ``` -- `--host, -h` Docker daemon socket to connect to. Defaults to "unix:///var/run/docker.sock" but can be pointed at a remote Docker host by specifying a TCP endpoint as "tcp://hostname:port". The host value can also be provided by setting the `DOCKER_HOST` environment variable. -- `--run-once` Run an update attempt against a container name list one time immediately and exit. -- `--interval, -i` Poll interval (in seconds). This value controls how frequently watchtower will poll for new images. Defaults to 300 seconds (5 minutes). -- `--schedule, -s` [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 * * *"` -- `--no-pull` 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. -- `--stop-timeout` 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. -- `--label-enable` Watch containers where the `com.centurylinklabs.watchtower.enable` label is set to true. -- `--cleanup` Remove 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. -- `--tlsverify` Use TLS when connecting to the Docker socket and verify the server's certificate. -- `--debug` Enable debug mode. When this option is specified you'll see more verbose logging in the watchtower log file. -- `--monitor-only` Will only monitor for new images, not update the containers. -- `--include-stopped` Will also include created and exited containers. -- `--help` Show documentation about the supported flags. - -See below for options used to configure notifications. + +#### Help + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentEnvironment VariableTypeDefaultDescription
--help---Shows documentation about the supported flags
--cleanupWATCHTOWER_CLEANUPBooleanfalse + 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-Booleanfalse + Enable debug mode with verbose logging. +
--host, -hDOCKER_HOSTString"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-stoppedWATCHTOWER_INCLUDE_STOPPEDBooleanfalse + Will also include created and exited containers. +
---interval, -iWATCHTOWER_POLL_INTERVALInteger300 + Poll interval (in seconds). This value controls how frequently watchtower will poll for new images. +
--label-enableWATCHTOWER_LABEL_ENABLEBooleanFalse + Watch containers where the `com.centurylinklabs.watchtower.enable` label is set to true. +
--monitor-onlyWATCHTOWER_MONITOR_ONLYBooleanFalse + Will only monitor for new images, not update the containers. +
--no-pullWATCHTOWER_NO_PULLBooleanFalse + 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-onceWATCHTOWER_RUN_ONCEBooleanFalse + Run an update attempt against a container name list one time immediately and exit. +
--schedule, -sWATCHTOWER_SCHEDULEString- + [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-timeoutWATCHTOWER_TIMEOUTDuration10s + 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. +
--tlsverifyDOCKER_TLS_VERIFYBooleanfalse + Use TLS when connecting to the Docker socket and verify the server's certificate. See below for options used to configure notifications. +
## Linked Containers