Add clarification when using USER UID:GI

Signed-off-by: Michael Irwin <mikesir87@gmail.com>
This commit is contained in:
Michael Irwin 2019-09-16 11:35:13 -04:00
parent 95327f4e62
commit b3a1681fd8
No known key found for this signature in database
GPG Key ID: 8C42FBB0E482C8CF
1 changed files with 3 additions and 0 deletions

View File

@ -1478,6 +1478,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 group (or GID) to use when running the image and for any `RUN`, `CMD` and
`ENTRYPOINT` instructions that follow it in the `Dockerfile`. `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**: > **Warning**:
> When the user doesn't have a primary group then the image (or the next > When the user doesn't have a primary group then the image (or the next
> instructions) will be run with the `root` group. > instructions) will be run with the `root` group.