From a84463d8d56a41c1bf9496efc35580789891c2c9 Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Wed, 7 Jun 2017 18:50:16 +0200 Subject: [PATCH] docs/reference/builder.md: mention that USER directive also allows to specify the user group. Signed-off-by: Slava Semushin --- docs/reference/builder.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/reference/builder.md b/docs/reference/builder.md index f8ef9cf56b..9ab4ba4df9 100644 --- a/docs/reference/builder.md +++ b/docs/reference/builder.md @@ -1306,11 +1306,18 @@ Keep the following things in mind about volumes in the `Dockerfile`. ## USER - USER daemon + USER [:] +or + USER [:] + +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`. + +> **Warning**: +> When the user does doesn't have a primary group then the image (or the next +> instructions) will be run with the `root` group. -The `USER` instruction sets the user name or UID to use when running the image -and for any `RUN`, `CMD` and `ENTRYPOINT` instructions that follow it in the -`Dockerfile`. ## WORKDIR