mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-14 06:06:38 +01:00
Documentation updates (#936)
* Update private-registries.md
* docs: fix codecov branch
* docs: clarify monitor and add head fail warning
* docs: remove unsupported features
* docs: add date format note and fix typo
* docs: 🌈
* docs: fix auto-format errors and linting
* docs: fix auto-format errors and linting
This commit is contained in:
parent
cc3ff5a588
commit
26dbc64b35
10 changed files with 210 additions and 153 deletions
|
|
@ -1,7 +1,8 @@
|
|||
## Executing commands before and after updating
|
||||
|
||||
> **DO NOTE**: These are shell commands executed with `sh`, and therefore require the
|
||||
> container to provide the `sh` executable.
|
||||
!!! note
|
||||
These are shell commands executed with `sh`, and therefore require the container to provide the `sh`
|
||||
executable.
|
||||
|
||||
It is possible to execute _pre/post\-check_ and _pre/post\-update_ commands
|
||||
**inside** every container updated by watchtower.
|
||||
|
|
@ -26,24 +27,21 @@ The commands are specified using docker container labels, the following are curr
|
|||
| Post Update | `com.centurylinklabs.watchtower.lifecycle.post-update` |
|
||||
| Post Check | `com.centurylinklabs.watchtower.lifecycle.post-check` |
|
||||
|
||||
These labels can be declared as instructions in a Dockerfile (with some example .sh files):
|
||||
These labels can be declared as instructions in a Dockerfile (with some example .sh files) or be specified as part of
|
||||
the `docker run` command line:
|
||||
|
||||
```docker
|
||||
LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="/sync.sh"
|
||||
=== "Dockerfile"
|
||||
```docker LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="/sync.sh"
|
||||
LABEL com.centurylinklabs.watchtower.lifecycle.pre-update="/dump-data.sh"
|
||||
LABEL com.centurylinklabs.watchtower.lifecycle.post-update="/restore-data.sh"
|
||||
LABEL com.centurylinklabs.watchtower.lifecycle.post-check="/send-heartbeat.sh"
|
||||
```
|
||||
|
||||
Or be specified as part of the `docker run` command line:
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--label=com.centurylinklabs.watchtower.lifecycle.pre-check="/sync.sh" \
|
||||
--label=com.centurylinklabs.watchtower.lifecycle.pre-update="/dump-data.sh" \
|
||||
--label=com.centurylinklabs.watchtower.lifecycle.post-update="/restore-data.sh" \
|
||||
someimage
|
||||
--label=com.centurylinklabs.watchtower.lifecycle.post-check="/send-heartbeat.sh" \
|
||||
=== "docker run"
|
||||
```bash docker run -d \
|
||||
--label=com.centurylinklabs.watchtower.lifecycle.pre-check="/sync.sh" \
|
||||
--label=com.centurylinklabs.watchtower.lifecycle.pre-update="/dump-data.sh" \
|
||||
--label=com.centurylinklabs.watchtower.lifecycle.post-update="/restore-data.sh" \
|
||||
someimage --label=com.centurylinklabs.watchtower.lifecycle.post-check="/send-heartbeat.sh" \
|
||||
```
|
||||
|
||||
### Timeouts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue