chore(docs): Update docs

This commit is contained in:
Jan Rundshagen 2024-07-09 09:22:02 +02:00
parent 7382727c74
commit 156d25ccea
No known key found for this signature in database
GPG key ID: D39ECE260D6616C7
12 changed files with 55 additions and 58 deletions

View file

@ -7,7 +7,7 @@ launching watchtower.
$ docker run -d \
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower \
beatkind/watchtower \
nginx redis
```
@ -18,7 +18,7 @@ the watchtower container after its execution.
```bash
$ docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower \
beatkind/watchtower \
--run-once \
nginx redis
```
@ -245,7 +245,7 @@ Environment Variable: WATCHTOWER_DISABLE_CONTAINERS
## Without updating containers
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
the [pre-check/post-check hooks](https://watchtower.devcdn.nelifecycle-hooks/), but will __not__ update the
containers.
!!! note
@ -325,7 +325,7 @@ Environment Variable: WATCHTOWER_RUN_ONCE
## HTTP API Mode
Runs Watchtower in HTTP API mode, only allowing image updates to be triggered by an HTTP request.
For details see [HTTP API](https://containrrr.dev/watchtower/http-api-mode).
For details see [HTTP API](https://watchtower.devcdn.nehttp-api-mode).
```text
Argument: --http-api-update
@ -357,7 +357,7 @@ Environment Variable: WATCHTOWER_HTTP_API_PERIODIC_POLLS
## Filter by scope
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.dev/watchtower/running-multiple-instances).
This enables [running multiple instances](https://watchtower.devcdn.nerunning-multiple-instances).
!!! note "Filter by lack of scope"
If you want other instances of watchtower to ignore the scoped containers, set this argument to `none`.

View file

@ -3,7 +3,7 @@ By default, watchtower will watch all containers. However, sometimes only some c
There are two options:
- **Fully exclude**: You can choose to exclude containers entirely from being watched by watchtower.
- **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.
- **Monitor only**: In this mode, watchtower checks for container updates, sends notifications and invokes the [pre-check/post-check hooks](https://watchtower.devcdn.nelifecycle-hooks/) on the containers but does **not** perform the update.
## Full Exclude
@ -31,7 +31,7 @@ If you need to exclude some containers, set the _com.centurylinklabs.watchtower.
- "com.centurylinklabs.watchtower.enable=false"
```
If instead you want to [only include containers with the enable label](https://containrrr.github.io/watchtower/arguments/#filter_by_enable_label), pass the `--label-enable` flag or the `WATCHTOWER_LABEL_ENABLE` environment variable on startup for watchtower and set the _com.centurylinklabs.watchtower.enable_ label with a value of `true` on the containers you want to watch.
If instead you want to [only include containers with the enable label](https://watchtower.devcdn.net/arguments/#filter_by_enable_label), pass the `--label-enable` flag or the `WATCHTOWER_LABEL_ENABLE` environment variable on startup for watchtower and set the _com.centurylinklabs.watchtower.enable_ label with a value of `true` on the containers you want to watch.
=== "dockerfile"
@ -55,7 +55,7 @@ If instead you want to [only include containers with the enable label](https://c
- "com.centurylinklabs.watchtower.enable=true"
```
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).
If you wish to create a monitoring scope, you will need to [run multiple instances and set a scope for each of them](https://watchtower.devcdn.net/running-multiple-instances).
Watchtower filters running containers by testing them against each configured criteria. A container is monitored if all criteria are met. For example:
@ -78,4 +78,4 @@ Or, it can be specified as part of the `docker run` command line:
docker run -d --label=com.centurylinklabs.watchtower.monitor-only=true someimage
```
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.
When the label is specified on a container, watchtower treats that container exactly as if [`WATCHTOWER_MONITOR_ONLY`](https://watchtower.devcdn.nearguments/#without_updating_containers) was set, but the effect is limited to the individual container.

View file

@ -16,7 +16,7 @@ services:
- "com.centurylinklabs.watchtower.enable=true"
watchtower:
image: containrrr/watchtower
image: beatkind/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --debug --http-api-update

View file

@ -1,4 +1,10 @@
<p style="text-align: center; margin-left: 1.6rem;">
> [!NOTE]
> This is a fork of the really nice project from [containrrr](https://github.com/containrrr) called [watchtower](https://github.com/containrrr/watchtower).
>
> I am not the original author of this project. I just forked it to make some changes to it and keep it up-to-date as properly as I can.
>
> Contributions, tips and hints are welcome. Just open an issue or a pull request. Please be aware that I am by no means a professional developer. I am just a Platform Engineer.
<img alt="Logotype depicting a lighthouse" src="./images/logo-450px.png" width="450" />
</p>
<h1 align="center">
@ -8,11 +14,8 @@
<p align="center">
A container-based solution for automating Docker container base image updates.
<br/><br/>
<a href="https://circleci.com/gh/containrrr/watchtower">
<img alt="Circle CI" src="https://circleci.com/gh/containrrr/watchtower.svg?style=shield" />
</a>
<a href="https://codecov.io/gh/containrrr/watchtower">
<img alt="Codecov" src="https://codecov.io/gh/containrrr/watchtower/branch/main/graph/badge.svg">
<a href="https://codecov.io/gh/beatkind/watchtower">
<img alt="Codecov" src="https://codecov.io/gh/beatkind/watchtower/branch/main/graph/badge.svg">
</a>
<a href="https://godoc.org/github.com/beatkind/watchtower">
<img alt="GoDoc" src="https://godoc.org/github.com/beatkind/watchtower?status.svg" />
@ -21,19 +24,13 @@
<img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/beatkind/watchtower" />
</a>
<a href="https://github.com/beatkind/watchtower/releases">
<img alt="latest version" src="https://img.shields.io/github/tag/containrrr/watchtower.svg" />
<img alt="latest version" src="https://img.shields.io/github/tag/beatkind/watchtower.svg" />
</a>
<a href="https://www.apache.org/licenses/LICENSE-2.0">
<img alt="Apache-2.0 License" src="https://img.shields.io/github/license/containrrr/watchtower.svg" />
<img alt="Apache-2.0 License" src="https://img.shields.io/github/license/beatkind/watchtower.svg" />
</a>
<a href="https://www.codacy.com/gh/containrrr/watchtower/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=containrrr/watchtower&amp;utm_campaign=Badge_Grade">
<img alt="Codacy Badge" src="https://app.codacy.com/project/badge/Grade/1c48cfb7646d4009aa8c6f71287670b8"/>
</a>
<a href="https://github.com/beatkind/watchtower/#contributors">
<img alt="All Contributors" src="https://img.shields.io/github/all-contributors/containrrr/watchtower" />
</a>
<a href="https://hub.docker.com/r/containrrr/watchtower">
<img alt="Pulls from DockerHub" src="https://img.shields.io/docker/pulls/containrrr/watchtower.svg" />
<a href="https://hub.docker.com/r/beatkind/watchtower">
<img alt="Pulls from DockerHub" src="https://img.shields.io/docker/pulls/beatkind/watchtower.svg" />
</a>
</p>
@ -50,7 +47,7 @@ the following command:
$ docker run -d \
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower
beatkind/watchtower
```
=== "docker-compose.yml"
@ -59,7 +56,7 @@ the following command:
version: "3"
services:
watchtower:
image: containrrr/watchtower
image: beatkind/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
```

View file

@ -8,7 +8,7 @@ For example, let's say you were running watchtower along with an instance of _ce
$ docker ps
CONTAINER ID IMAGE STATUS PORTS NAMES
967848166a45 centurylink/wetty-cli Up 10 minutes 0.0.0.0:8080->3000/tcp wetty
6cc4d2a9d1a5 containrrr/watchtower Up 15 minutes watchtower
6cc4d2a9d1a5 beatkind/watchtower Up 15 minutes watchtower
```
Every day watchtower will pull the latest _centurylink/wetty-cli_ image and compare it to the one that was used to run the "wetty" container. If it sees that the image has changed it will stop/remove the "wetty" container and then restart it using the new image and the same `docker run` options that were used to start the container initially (in this case, that would include the `-p 8080:3000` port mapping).

View file

@ -19,7 +19,7 @@ system, [logrus](http://github.com/sirupsen/logrus).
- `--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`.
- `--notifications-hostname` (env. `WATCHTOWER_NOTIFICATIONS_HOSTNAME`): Custom hostname specified in subject/title. Useful to override the operating system hostname.
- `--notifications-delay` (env. `WATCHTOWER_NOTIFICATIONS_DELAY`): Delay before sending notifications expressed in seconds.
- 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.
- Watchtower will post a notification every time it is started. This behavior [can be changed](https://watchtower.devcdn.net/arguments/#without_sending_a_startup_message) with an argument.
- `--notification-title-tag` (env. `WATCHTOWER_NOTIFICATION_TITLE_TAG`): Prefix to include in the title. Useful when running multiple watchtowers.
- `--notification-skip-title` (env. `WATCHTOWER_NOTIFICATION_SKIP_TITLE`): Do not pass the title param to notifications. This will not pass a dynamic title override to notification services. If no title is configured for the service, it will remove the title all together.
- `--notification-log-stdout` (env. `WATCHTOWER_NOTIFICATION_LOG_STDOUT`): Enable output from `logger://` shoutrrr service to stdout.
@ -69,7 +69,7 @@ docker run -d \
-v /var/run/docker.sock:/var/run/docker.sock \
-e WATCHTOWER_NOTIFICATION_URL="discord://token@channel slack://watchtower@token-a/token-b/token-c" \
-e WATCHTOWER_NOTIFICATION_TEMPLATE="{{range .}}{{.Time.Format \"2006-01-02 15:04:05\"}} ({{.Level}}): {{.Message}}{{println}}{{end}}" \
containrrr/watchtower
beatkind/watchtower
```
## Report templates
@ -138,7 +138,7 @@ Example using a custom report template that always sends a session report after
{{range .Entries -}}{{.Message}}{{\"\n\"}}{{- end -}}
{{- end -}}
" \
containrrr/watchtower
beatkind/watchtower
```
=== "docker-compose"
@ -147,7 +147,7 @@ Example using a custom report template that always sends a session report after
version: "3"
services:
watchtower:
image: containrrr/watchtower
image: beatkind/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
env:
@ -199,7 +199,7 @@ If watchtower is started with `notify-upgrade` as it's first argument, it will g
-v /var/run/docker.sock:/var/run/docker.sock \
-e WATCHTOWER_NOTIFICATIONS=slack \
-e WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL="https://hooks.slack.com/services/xxx/yyyyyyyyyyyyyyy" \
containrrr/watchtower \
beatkind/watchtower \
notify-upgrade
```
@ -209,7 +209,7 @@ If watchtower is started with `notify-upgrade` as it's first argument, it will g
version: "3"
services:
watchtower:
image: containrrr/watchtower
image: beatkind/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
env:
@ -228,7 +228,7 @@ You can then copy this file from the container (a message with the full command
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
--env-file watchtower-notifications.env \
containrrr/watchtower
beatkind/watchtower
```
=== "docker-compose.yml"
@ -237,7 +237,7 @@ You can then copy this file from the container (a message with the full command
version: "3"
services:
watchtower:
image: containrrr/watchtower
image: beatkind/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
env_file:
@ -272,7 +272,7 @@ docker run -d \
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=fromaddress@gmail.com \
-e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=app_password \
-e WATCHTOWER_NOTIFICATION_EMAIL_DELAY=2 \
containrrr/watchtower
beatkind/watchtower
```
The previous example assumes, that you already have an SMTP server up and running you can connect to. If you don't or you want to bring up watchtower with your own simple SMTP relay the following `docker-compose.yml` might be a good start for you.
@ -285,7 +285,7 @@ Example including an SMTP relay:
version: '3.8'
services:
watchtower:
image: containrrr/watchtower:latest
image: beatkind/watchtower:latest
container_name: watchtower
environment:
WATCHTOWER_MONITOR_ONLY: 'true'
@ -347,7 +347,7 @@ docker run -d \
-e WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL="https://hooks.slack.com/services/xxx/yyyyyyyyyyyyyyy" \
-e WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER=watchtower-server-1 \
-e WATCHTOWER_NOTIFICATION_SLACK_CHANNEL=#my-custom-channel \
containrrr/watchtower
beatkind/watchtower
```
### Microsoft Teams
@ -367,7 +367,7 @@ docker run -d \
-e WATCHTOWER_NOTIFICATIONS=msteams \
-e WATCHTOWER_NOTIFICATION_MSTEAMS_HOOK_URL="https://outlook.office.com/webhook/xxxxxxxx@xxxxxxx/IncomingWebhook/yyyyyyyy/zzzzzzzzzz" \
-e WATCHTOWER_NOTIFICATION_MSTEAMS_USE_LOG_DATA=true \
containrrr/watchtower
beatkind/watchtower
```
### Gotify
@ -381,7 +381,7 @@ docker run -d \
-e WATCHTOWER_NOTIFICATIONS=gotify \
-e WATCHTOWER_NOTIFICATION_GOTIFY_URL="https://my.gotify.tld/" \
-e WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN="SuperSecretToken" \
containrrr/watchtower
beatkind/watchtower
```
`-e WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN` or `--notification-gotify-token` can also reference a file, in which case the contents of the file are used.

View file

@ -63,7 +63,7 @@ When the watchtower Docker container is started, the created configuration file
(`<PATH>/config.json` in this example) needs to be passed to the container:
```bash
docker run [...] -v <PATH>/config.json:/config.json containrrr/watchtower
docker run [...] -v <PATH>/config.json:/config.json beatkind/watchtower
```
### Share the Docker configuration file
@ -76,7 +76,7 @@ additional configuration file is not necessary.
When the Docker container is started, pass the configuration file to watchtower:
```bash
docker run [...] -v <PATH_TO_HOME_DIR>/.docker/config.json:/config.json containrrr/watchtower
docker run [...] -v <PATH_TO_HOME_DIR>/.docker/config.json:/config.json beatkind/watchtower
```
When creating the watchtower container via docker-compose, use the following lines:
@ -85,7 +85,7 @@ When creating the watchtower container via docker-compose, use the following lin
version: "3.4"
services:
watchtower:
image: containrrr/watchtower:latest
image: beatkind/watchtower:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- <PATH_TO_HOME_DIR>/.docker/config.json:/config.json
@ -101,7 +101,7 @@ version: "3.4"
services:
watchtower:
image: containrrr/watchtower
image: beatkind/watchtower
environment:
DOCKER_CONFIG: /config
volumes:
@ -178,7 +178,7 @@ in a volume that may be mounted onto your watchtower container.
# Check for new images and restart things if a new image exists
# for any of our containers.
watchtower:
image: containrrr/watchtower:latest
image: beatkind/watchtower:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- .docker/config.json:/config.json

View file

@ -3,7 +3,7 @@ By default, watchtower is set-up to monitor the local Docker daemon (the same da
```bash
docker run -d \
--name watchtower \
containrrr/watchtower --host "tcp://10.0.1.2:2375"
beatkind/watchtower --host "tcp://10.0.1.2:2375"
```
or
@ -12,7 +12,7 @@ or
docker run -d \
--name watchtower \
-e DOCKER_HOST="tcp://10.0.1.2:2375" \
containrrr/watchtower
beatkind/watchtower
```
Note in both of the examples above that it is unnecessary to mount the _/var/run/docker.sock_ into the watchtower container.

View file

@ -1,4 +1,4 @@
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.
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://watchtower.devcdn.net/arguments/#filter_by_scope) to each running instance.
!!! note
- Multiple instances can't run with the same scope;
@ -18,7 +18,7 @@ services:
labels: [ "com.centurylinklabs.watchtower.scope=myscope" ]
scoped-watchtower:
image: containrrr/watchtower
image: beatkind/watchtower
volumes: [ "/var/run/docker.sock:/var/run/docker.sock" ]
command: --interval 30 --scope myscope
labels: [ "com.centurylinklabs.watchtower.scope=myscope" ]
@ -35,7 +35,7 @@ services:
labels: [ "com.centurylinklabs.watchtower.scope=" ]
unscoped-watchtower:
image: containrrr/watchtower
image: beatkind/watchtower
volumes: [ "/var/run/docker.sock:/var/run/docker.sock" ]
command: --interval 30 --scope none
```

View file

@ -10,5 +10,5 @@ docker run -d \
-e DOCKER_HOST=$DOCKER_HOST \
-e DOCKER_CERT_PATH=/etc/ssl/docker \
-v $DOCKER_CERT_PATH:/etc/ssl/docker \
containrrr/watchtower --tlsverify
beatkind/watchtower --tlsverify
```

View file

@ -2,5 +2,5 @@
If watchtower is monitoring the same Docker daemon under which the watchtower container itself is running (i.e. if you
volume-mounted `/var/run/docker.sock` into the watchtower container) then it has the ability to update itself.
If a new version of the `containrrr/watchtower` image is pushed to the Docker Hub, your watchtower will pull down the
If a new version of the `beatkind/watchtower` image is pushed to the Docker Hub, your watchtower will pull down the
new image and restart itself automatically.

View file

@ -1,4 +1,4 @@
Watchtower is itself packaged as a Docker container so installation is as simple as pulling the `containrrr/watchtower` image. If you are using ARM based architecture, pull the appropriate `containrrr/watchtower:armhf-<tag>` image from the [containrrr Docker Hub](https://hub.docker.com/r/containrrr/watchtower/tags/).
Watchtower is itself packaged as a Docker container so installation is as simple as pulling the `beatkind/watchtower` image. If you are using ARM based architecture, pull the appropriate `beatkind/watchtower:armhf-<tag>` image from the [beatkind Docker Hub](https://hub.docker.com/r/beatkind/watchtower/tags/).
Since the watchtower code needs to interact with the Docker API in order to monitor the running containers, you need to mount _/var/run/docker.sock_ into the container with the `-v` flag when you run it.
@ -8,7 +8,7 @@ Run the `watchtower` container with the following command:
docker run -d \
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower
beatkind/watchtower
```
If pulling images from private Docker registries, supply registry authentication credentials with the environment variables `REPO_USER` and `REPO_PASS`
@ -22,7 +22,7 @@ docker run -d \
-e REPO_USER=username \
-e REPO_PASS=password \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower container_to_watch --debug
beatkind/watchtower container_to_watch --debug
```
Also check out [this Stack Overflow answer](https://stackoverflow.com/a/30494145/7872793) for more options on how to pass environment variables.
@ -34,7 +34,7 @@ docker run -d \
--name watchtower \
-v $HOME/.docker/config.json:/config.json \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower container_to_watch --debug
beatkind/watchtower container_to_watch --debug
```
!!! note "Changes to config.json while running"
@ -60,7 +60,7 @@ services:
- "443:3443"
- "80:3080"
watchtower:
image: containrrr/watchtower
image: beatkind/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.docker/config.json:/config.json