summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2022-02-03 15:57:12 +0300
committerGitHub <noreply@github.com>2022-02-03 15:57:12 +0300
commit8875acec2882ea02b932957c3618ef53b7c0da94 (patch)
tree697cb287d2d24681c2e125558e6fce5161445c79
parentb5d65d1305f687e0aa9433cca3a7a6e0afcdd725 (diff)
docs: improve "Docker container names resolution" section (#12079)
-rw-r--r--packaging/docker/README.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/packaging/docker/README.md b/packaging/docker/README.md
index 0a4804ae98..e00391bb6a 100644
--- a/packaging/docker/README.md
+++ b/packaging/docker/README.md
@@ -321,12 +321,25 @@ services:
#### Giving group access to the Docker socket (less safe)
-**Important Note**: You should seriously consider the necessity of activating this option, as it grants to the `netdata`
+> You should seriously consider the necessity of activating this option, as it grants to the `netdata`
user access to the privileged socket connection of docker service and therefore your whole machine.
If you want to have your container names resolved by Netdata, make the `netdata` user be part of the group that owns the
socket.
+```yaml
+version: '3'
+services:
+ netdata:
+ image: netdata/netdata
+ # ... rest of your config ...
+ volumes:
+ # ... other volumes ...
+ - /var/run/docker.sock:/var/run/docker.sock:ro
+ environment:
+ - PGID=[GROUP NUMBER]
+```
+
To achieve that just add environment variable `PGID=[GROUP NUMBER]` to the Netdata container, where `[GROUP NUMBER]` is
practically the group id of the group assigned to the docker socket, on your host.