mirror of https://github.com/docker/cli.git
Merge pull request #191 from php-coder/improve_user_directive_doc
docs/reference/builder.md: mention that USER directive also allows to specify a user group
This commit is contained in:
commit
4c224a7786
|
@ -1306,11 +1306,18 @@ Keep the following things in mind about volumes in the `Dockerfile`.
|
||||||
|
|
||||||
## USER
|
## USER
|
||||||
|
|
||||||
USER daemon
|
USER <user>[:<group>]
|
||||||
|
or
|
||||||
|
USER <UID>[:<GID>]
|
||||||
|
|
||||||
|
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
|
## WORKDIR
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue