This commit is contained in:
John Lancaster
2024-01-20 21:37:51 -06:00
parent 67c39f171e
commit 11f269cd49
2 changed files with 2 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ Various tools to monitor Docker containers
## Setup ## Setup
Set the DOCKER_GUID so the container has permission to access the socket Set the `DOCKER_GUID` so the container has permission to access the socket. This ensures that the telegraf container will have read access on the Docker socket.
```shell ```shell
export DOCKER_GUID=$(getent group docker | awk -F ':' '{print $3}') export DOCKER_GUID=$(getent group docker | awk -F ':' '{print $3}')

View File

@@ -3,7 +3,7 @@ services:
telegraf-docker: telegraf-docker:
image: telegraf image: telegraf
restart: unless-stopped restart: unless-stopped
user: root:$DOCKER_GUID user: root:${DOCKER_GUID}
env_file: env_file:
- .env - .env
volumes: volumes: