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
Set the DOCKER_GUID so the container has permission to access the socket
```shell
root@docker:~/docker-observation# getent group docker
docker:x:995:root
export DOCKER_GUID=$(getent group docker | awk -F ':' '{print $3}')
```

View File

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