Update docker-compose.yml

obtain docker guid programmatically instead of using a hardcoded 998 value that may not be the same on every server
This commit is contained in:
LRVT 2023-03-01 11:42:05 +01:00 committed by GitHub
parent 3ea15d168f
commit 751053d83f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ services:
telegraf:
image: telegraf:latest
restart: unless-stopped
user: telegraf:998 # see: https://www.influxdata.com/blog/docker-run-telegraf-as-non-root/
user: telegraf:$(stat -c '%g' /var/run/docker.sock) # see: https://www.influxdata.com/blog/docker-run-telegraf-as-non-root/
container_name: telegraf
hostname: telegraf
dns: