docs(inputs.docker): Add help message about permissions for container (#14094)

This commit is contained in:
Damian Szczepanik 2023-10-12 16:40:19 +02:00 committed by GitHub
parent 362026b7f0
commit 0e1f3f8b86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -130,9 +130,12 @@ sudo usermod -aG docker telegraf
If telegraf is run within a container, the unix socket will need to be exposed
within the telegraf container. This can be done in the docker CLI by add the
option `-v /var/run/docker.sock:/var/run/docker.sock` or adding the following
lines to the telegraf container definition in a docker compose file:
lines to the telegraf container definition in a docker compose file.
Additionally docker `telegraf` user must be assigned to `docker` group id
from host:
```yaml
user: telegraf:<host_docker_gid>
volumes:
- /var/run/docker.sock:/var/run/docker.sock
```