Skip to content

Commit d0ecc23

Browse files
authored
docs: fix markdown lint issues (#995)
* fix list indents in notifications * fix missing lang tag * fix list indent and extra newlines * further indentation experimentation * fix remark lint-recommend warnings
1 parent 145fe6d commit d0ecc23

File tree

9 files changed

+43
-44
lines changed

9 files changed

+43
-44
lines changed

docs/arguments.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Environment Variable: WATCHTOWER_HTTP_API_TOKEN
258258
## HTTP API periodic polls
259259
Keep running periodic updates if the HTTP API mode is enabled, otherwise the HTTP API would prevent periodic polls.
260260

261-
```
261+
```text
262262
Argument: --http-api-periodic-polls
263263
Environment Variable: WATCHTOWER_HTTP_API_PERIODIC_POLLS
264264
Type: Boolean
@@ -340,4 +340,4 @@ requests and may rate limit pull requests (mainly docker.io).
340340
Environment Variable: WATCHTOWER_WARN_ON_HEAD_FAILURE
341341
Possible values: always, auto, never
342342
Default: auto
343-
```
343+
```

docs/container-selection.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ By default, watchtower will watch all containers. However, sometimes only some c
22

33
There are two options:
44

5-
- **Fully exclude**: You can choose to exclude containers entirely from being watched by watchtower.
6-
- **Monitor only**: In this mode, watchtower checks for container updates, sends notifications and invokes the [pre-check/post-check hooks](https://containrrr.dev/watchtower/lifecycle-hooks/) on the containers but does **not** perform the update.
5+
- **Fully exclude**: You can choose to exclude containers entirely from being watched by watchtower.
6+
- **Monitor only**: In this mode, watchtower checks for container updates, sends notifications and invokes the [pre-check/post-check hooks](https://containrrr.dev/watchtower/lifecycle-hooks/) on the containers but does **not** perform the update.
77

88
## Full Exclude
99

@@ -34,8 +34,8 @@ docker run -d --label=com.centurylinklabs.watchtower.enable=true someimage
3434
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).
3535

3636
Watchtower filters running containers by testing them against each configured criteria. A container is monitored if all criteria are met. For example:
37-
- If a container's name is on the monitoring name list (not empty `--name` argument) but it is not enabled (_centurylinklabs.watchtower.enable=false_), it won't be monitored;
38-
- If a container's name is not on the monitoring name list (not empty `--name` argument), even if it is enabled (_centurylinklabs.watchtower.enable=true_ and `--label-enable` flag is set), it won't be monitored;
37+
- If a container's name is on the monitoring name list (not empty `--name` argument) but it is not enabled (_centurylinklabs.watchtower.enable=false_), it won't be monitored;
38+
- If a container's name is not on the monitoring name list (not empty `--name` argument), even if it is enabled (_centurylinklabs.watchtower.enable=true_ and `--label-enable` flag is set), it won't be monitored;
3939

4040
## Monitor Only
4141

@@ -54,5 +54,3 @@ docker run -d --label=com.centurylinklabs.watchtower.monitor-only=true someimage
5454
```
5555

5656
When the label is specified on a container, watchtower treats that container exactly as if [`WATCHTOWER_MONITOR_ONLY`](https://containrrr.dev/watchtower/arguments/#without_updating_containers) was set, but the effect is limited to the individual container.
57-
58-

docs/http-api-mode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Watchtower provides an HTTP API mode that enables an HTTP endpoint that can be requested to trigger container updating. The current available endpoint list is:
22

3-
- `/v1/update` - triggers an update for all of the containers monitored by this Watchtower instance.
3+
- `/v1/update` - triggers an update for all of the containers monitored by this Watchtower instance.
44

55
---
66

docs/lifecycle-hooks.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
It is possible to execute _pre/post\-check_ and _pre/post\-update_ commands
1111
**inside** every container updated by watchtower.
1212

13-
- The _pre-check_ command is executed for each container prior to every update cycle.
14-
- The _pre-update_ command is executed before stopping the container when an update is about to start.
15-
- The _post-update_ command is executed after restarting the updated container
16-
- The _post-check_ command is executed for each container post every update cycle.
13+
- The _pre-check_ command is executed for each container prior to every update cycle.
14+
- The _pre-update_ command is executed before stopping the container when an update is about to start.
15+
- The _post-update_ command is executed after restarting the updated container
16+
- The _post-check_ command is executed for each container post every update cycle.
1717

1818
This feature is disabled by default. To enable it, you need to set the option
1919
`--enable-lifecycle-hooks` on the command line, or set the environment variable

docs/metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ as well as creating a port mapping for your container for port `8080`.
2222
The repository contains a demo with prometheus and grafana, available through `docker-compose.yml`. This demo
2323
is preconfigured with a dashboard, which will look something like this:
2424

25-
![grafana metrics](assets/grafana-dashboard.png)
25+
![grafana metrics](assets/grafana-dashboard.png)

docs/notifications.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ system, [logrus](http://github.com/sirupsen/logrus). The types of notifications
55
comma-separated list of values to the `--notifications` option
66
(or corresponding environment variable `WATCHTOWER_NOTIFICATIONS`), which has the following valid values:
77

8-
- `email` to send notifications via e-mail
9-
- `slack` to send notifications through a Slack webhook
10-
- `msteams` to send notifications via MSTeams webhook
11-
- `gotify` to send notifications via Gotify
12-
- `shoutrrr` to send notifications via [containrrr/shoutrrr](https://github.com/containrrr/shoutrrr)
8+
- `email` to send notifications via e-mail
9+
- `slack` to send notifications through a Slack webhook
10+
- `msteams` to send notifications via MSTeams webhook
11+
- `gotify` to send notifications via Gotify
12+
- `shoutrrr` to send notifications via [containrrr/shoutrrr](https://github.com/containrrr/shoutrrr)
1313

1414
!!! note "Using multiple notifications with environment variables"
1515
There is currently a bug in Viper (https://github.com/spf13/viper/issues/380), which prevents comma-separated slices to
@@ -24,25 +24,25 @@ comma-separated list of values to the `--notifications` option
2424

2525
## Settings
2626

27-
- `--notifications-level` (env. `WATCHTOWER_NOTIFICATIONS_LEVEL`): Controls the log level which is used for the notifications. If omitted, the default log level is `info`. Possible values are: `panic`, `fatal`, `error`, `warn`, `info`, `debug` or `trace`.
28-
- `--notifications-hostname` (env. `WATCHTOWER_NOTIFICATIONS_HOSTNAME`): Custom hostname specified in subject/title. Useful to override the operating system hostname.
29-
- Watchtower will post a notification every time it is started. This behavior [can be changed](https://containrrr.github.io/watchtower/arguments/#without_sending_a_startup_message) with an argument.
27+
- `--notifications-level` (env. `WATCHTOWER_NOTIFICATIONS_LEVEL`): Controls the log level which is used for the notifications. If omitted, the default log level is `info`. Possible values are: `panic`, `fatal`, `error`, `warn`, `info`, `debug` or `trace`.
28+
- `--notifications-hostname` (env. `WATCHTOWER_NOTIFICATIONS_HOSTNAME`): Custom hostname specified in subject/title. Useful to override the operating system hostname.
29+
- Watchtower will post a notification every time it is started. This behavior [can be changed](https://containrrr.github.io/watchtower/arguments/#without_sending_a_startup_message) with an argument.
3030

3131
## Available services
3232

3333
### Email
3434

3535
To receive notifications by email, the following command-line options, or their corresponding environment variables, can be set:
3636

37-
- `--notification-email-from` (env. `WATCHTOWER_NOTIFICATION_EMAIL_FROM`): The e-mail address from which notifications will be sent.
38-
- `--notification-email-to` (env. `WATCHTOWER_NOTIFICATION_EMAIL_TO`): The e-mail address to which notifications will be sent.
39-
- `--notification-email-server` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER`): The SMTP server to send e-mails through.
40-
- `--notification-email-server-tls-skip-verify` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER_TLS_SKIP_VERIFY`): Do not verify the TLS certificate of the mail server. This should be used only for testing.
41-
- `--notification-email-server-port` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT`): The port used to connect to the SMTP server to send e-mails through. Defaults to `25`.
42-
- `--notification-email-server-user` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER`): The username to authenticate with the SMTP server with.
43-
- `--notification-email-server-password` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD`): The password to authenticate with the SMTP server with. Can also reference a file, in which case the contents of the file are used.
44-
- `--notification-email-delay` (env. `WATCHTOWER_NOTIFICATION_EMAIL_DELAY`): Delay before sending notifications expressed in seconds.
45-
- `--notification-email-subjecttag` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SUBJECTTAG`): Prefix to include in the subject tag. Useful when running multiple watchtowers.
37+
- `--notification-email-from` (env. `WATCHTOWER_NOTIFICATION_EMAIL_FROM`): The e-mail address from which notifications will be sent.
38+
- `--notification-email-to` (env. `WATCHTOWER_NOTIFICATION_EMAIL_TO`): The e-mail address to which notifications will be sent.
39+
- `--notification-email-server` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER`): The SMTP server to send e-mails through.
40+
- `--notification-email-server-tls-skip-verify` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER_TLS_SKIP_VERIFY`): Do not verify the TLS certificate of the mail server. This should be used only for testing.
41+
- `--notification-email-server-port` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT`): The port used to connect to the SMTP server to send e-mails through. Defaults to `25`.
42+
- `--notification-email-server-user` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER`): The username to authenticate with the SMTP server with.
43+
- `--notification-email-server-password` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD`): The password to authenticate with the SMTP server with. Can also reference a file, in which case the contents of the file are used.
44+
- `--notification-email-delay` (env. `WATCHTOWER_NOTIFICATION_EMAIL_DELAY`): Delay before sending notifications expressed in seconds.
45+
- `--notification-email-subjecttag` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SUBJECTTAG`): Prefix to include in the subject tag. Useful when running multiple watchtowers.
4646

4747
Example:
4848

@@ -121,7 +121,7 @@ By default, watchtower will send messages under the name `watchtower`, you can c
121121

122122
Other, optional, variables include:
123123

124-
- `--notification-slack-channel` (env. `WATCHTOWER_NOTIFICATION_SLACK_CHANNEL`): A string which overrides the webhook's default channel. Example: #my-custom-channel.
124+
- `--notification-slack-channel` (env. `WATCHTOWER_NOTIFICATION_SLACK_CHANNEL`): A string which overrides the webhook's default channel. Example: #my-custom-channel.
125125

126126
Example:
127127

@@ -178,15 +178,15 @@ If you want to disable TLS verification for the Gotify instance, you can use eit
178178

179179
To send notifications via shoutrrr, the following command-line options, or their corresponding environment variables, can be set:
180180

181-
- `--notification-url` (env. `WATCHTOWER_NOTIFICATION_URL`): The shoutrrr service URL to be used.
181+
- `--notification-url` (env. `WATCHTOWER_NOTIFICATION_URL`): The shoutrrr service URL to be used.
182182

183183
Go to [containrrr.github.io/shoutrrr/services/overview](https://containrrr.github.io/shoutrrr/services/overview) to
184184
learn more about the different service URLs you can use. You can define multiple services by space separating the
185185
URLs. (See example below)
186186

187187
You can customize the message posted by setting a template.
188188

189-
- `--notification-template` (env. `WATCHTOWER_NOTIFICATION_TEMPLATE`): The template used for the message.
189+
- `--notification-template` (env. `WATCHTOWER_NOTIFICATION_TEMPLATE`): The template used for the message.
190190

191191
The template is a Go [template](https://golang.org/pkg/text/template/) and that format a list
192192
of [log entries](https://pkg.go.dev/github.com/sirupsen/logrus?tab=doc#Entry).
@@ -198,7 +198,7 @@ outputs timestamp and log level.
198198
If you want to adjust the date/time format it must show how the
199199
[reference time](https://golang.org/pkg/time/#pkg-constants) (_Mon Jan 2 15:04:05 MST 2006_) would be displayed in your
200200
custom format.
201-
i.e. The day of the year has to be 1, the month has to be 2 (february), the hour 3 (or 15 for 24h time) etc.
201+
i.e., The day of the year has to be 1, the month has to be 2 (february), the hour 3 (or 15 for 24h time) etc.
202202

203203
Example:
204204

docs/private-registries.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ environment, watchtower needs to know the credentials to access the registry.
55
The credentials can be provided to watchtower in a configuration file called `config.json`.
66
There are two ways to generate this configuration file:
77

8-
* The configuration file can be created manually.
9-
* Call `docker login <REGISTRY_NAME>` and share the resulting configuration file.
8+
* The configuration file can be created manually.
9+
* Call `docker login <REGISTRY_NAME>` and share the resulting configuration file.
1010

1111
### Create the configuration file manually
1212
Create a new configuration file with the following syntax and a base64 encoded username and
@@ -87,7 +87,6 @@ services:
8787
- /var/run/docker.sock:/var/run/docker.sock
8888
```
8989
90-
9190
## Credential helpers
9291
Some private Docker registries (the most prominent probably being AWS ECR) use non-standard ways of authentication.
9392
To be able to use this together with watchtower, we need to use a credential helper.
@@ -98,7 +97,6 @@ helper in a separate container and mount it using volumes.
9897
### Example
9998
Example implementation for use with [amazon-ecr-credential-helper](https://github.com/awslabs/amazon-ecr-credential-helper):
10099
101-
102100
Use the dockerfile below to build the [amazon-ecr-credential-helper](https://github.com/awslabs/amazon-ecr-credential-helper),
103101
in a volume that may be mounted onto your watchtower container.
104102
@@ -175,9 +173,12 @@ A few additional notes:
175173

176174
1. With docker-compose the volume (helper, in this case) MUST be set to `external: true`, otherwise docker-compose
177175
will preface it with the directory name.
176+
178177
2. Note that "credsStore" : "ecr-login" is needed - and in theory if you have that you can remove the
179-
credHelpers section
178+
credHelpers section
179+
180180
3. I have this running on an EC2 instance that has credentials assigned to it - so no keys are needed; however,
181181
you may need to include the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables as well.
182+
182183
4. An alternative to adding the various variables is to create a ~/.aws/config and ~/.aws/credentials files and
183184
place the settings there, then mount the ~/.aws directory to / in the container.

docs/remote-hosts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ docker run -d \
1515
containrrr/watchtower
1616
```
1717

18-
Note in both of the examples above that it is unnecessary to mount the _/var/run/docker.sock_ into the watchtower container.
18+
Note in both of the examples above that it is unnecessary to mount the _/var/run/docker.sock_ into the watchtower container.

docs/running-multiple-instances.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
By default, Watchtower will clean up other instances and won't allow multiple instances running on the same Docker host or swarm. It is possible to override this behavior by defining a [scope](https://containrrr.github.io/watchtower/arguments/#filter_by_scope) to each running instance.
22

33
Notice that:
4-
- Multiple instances can't run with the same scope;
5-
- An instance without a scope will clean up other running instances, even if they have a defined scope;
4+
- Multiple instances can't run with the same scope;
5+
- An instance without a scope will clean up other running instances, even if they have a defined scope;
66

77
To define an instance monitoring scope, use the `--scope` argument or the `WATCHTOWER_SCOPE` environment variable on startup and set the _com.centurylinklabs.watchtower.scope_ label with the same value for the containers you want to include in this instance's scope (including the instance itself).
88

@@ -24,4 +24,4 @@ services:
2424
command: --interval 30 --scope myscope
2525
labels:
2626
- "com.centurylinklabs.watchtower.scope=myscope"
27-
```
27+
```

0 commit comments

Comments
 (0)