From d0f3ea3683b57262eaa6b9bf9fc474bb08f1f962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nils=20m=C3=A5s=C3=A9n?= Date: Thu, 16 Jul 2020 11:35:59 +0200 Subject: [PATCH] docs: document DOCKER_CONFIG environment variable (#602) --- docs/private-registries.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/private-registries.md b/docs/private-registries.md index 23955b1..147e307 100644 --- a/docs/private-registries.md +++ b/docs/private-registries.md @@ -69,6 +69,21 @@ watchtower: [...] ``` +#### Docker Config path +By default, watchtower will look for the `config.json` file in `/`, but this can be changed by setting the `DOCKER_CONFIG` environment variable to the directory path where your config is located. This is useful for setups where the config.json file is changed while the watchtower instance is running, as the changes will not be picked up for a mounted file if the inode changes. +Example usage: + +```yaml +watchtower: + image: containrrr/watchtower + environment: + DOCKER_CONFIG: /config + volumes: + - /etc/watchtower/config/:/config/ + - /var/run/docker.sock:/var/run/docker.sock +``` + + ## Credential helpers Some private Docker registries (the most prominent probably being AWS ECR) use non-standard ways of authentication. To be able to use this together with watchtower, we need to use a credential helper.