summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGeorge Lester <glester491@gmail.com>2016-07-08 00:29:13 -0700
committerGeorge Lester <glester491@gmail.com>2016-09-11 23:10:49 -0700
commitdada36f732ed7f7fc05c0f9841a432c490c7ff9c (patch)
tree3bd2cfb7d32fb1b85c8cead9f31e979a81de9818 /docs
parent3dec600d8218833de11279e1dac6af048222dbc6 (diff)
Supported group_add
Signed-off-by: George Lester <glester491@gmail.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/compose-file.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/compose-file.md b/docs/compose-file.md
index 9f4bd121..384649b1 100644
--- a/docs/compose-file.md
+++ b/docs/compose-file.md
@@ -889,6 +889,20 @@ A full example:
host2: 172.28.1.6
host3: 172.28.1.7
+### group_add
+
+Specify additional groups (by name or number) which the user inside the container will be a member of. Groups must exist in both the container and the host system to be added. An example of where this is useful is when multiple containers (running as different users) need to all read or write the same file on the host system. That file can be owned by a group shared by all the containers, and specified in `group_add`. See the [Docker documentation](https://docs.docker.com/engine/reference/run/#/additional-groups) for more details.
+
+A full example:
+
+ version: '2'
+ services:
+ image: alpine
+ group_add:
+ - mail
+
+Running `id` inside the created container will show that the user belongs to the `mail` group, which would not have been the case if `group_add` were not used.
+
### internal
By default, Docker also connects a bridge network to it to provide external connectivity. If you want to create an externally isolated overlay network, you can set this option to `true`.