From 365bae4f89a47841616d7aa087f1de68137bfaaa Mon Sep 17 00:00:00 2001 From: Michael Irwin Date: Mon, 16 Sep 2019 11:35:13 -0400 Subject: [PATCH] Add clarification when using USER UID:GI Signed-off-by: Michael Irwin (cherry picked from commit b3a1681fd81cae1abe67b1a2c0ad6f137593c6ea) Signed-off-by: Sebastiaan van Stijn --- docs/reference/builder.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/reference/builder.md b/docs/reference/builder.md index fdc36302e7..656f90f228 100644 --- a/docs/reference/builder.md +++ b/docs/reference/builder.md @@ -1484,6 +1484,9 @@ The `USER` instruction sets the user name (or UID) and optionally the user group (or GID) to use when running the image and for any `RUN`, `CMD` and `ENTRYPOINT` instructions that follow it in the `Dockerfile`. +> Note that when specifying a group for the user, the user will have _only_ the +> specified group membership. Any other configured group memberships will be ignored. + > **Warning**: > When the user doesn't have a primary group then the image (or the next > instructions) will be run with the `root` group.