changed to use env variable for the docker socket guid

This commit is contained in:
John Lancaster
2023-11-29 20:50:30 -06:00
parent dfd4705e82
commit f995754ef9
2 changed files with 4 additions and 3 deletions

View File

@@ -11,7 +11,8 @@ Various tools to monitor Docker containers
## Setup ## Setup
Set the DOCKER_GUID so the container has permission to access the socket
```shell ```shell
root@docker:~/docker-observation# getent group docker export DOCKER_GUID=$(getent group docker | awk -F ':' '{print $3}')
docker:x:995:root
``` ```

View File

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