The USER
(doc) instruction sets the user name (or UID) and optionally the user group (or GID) to use as the default user and group for the remainder of the current stage. The specified user is used for RUN
instructions and at runtime, runs the relevant ENTRYPOINT
and CMD
commands.
Related
See also
- UID, GID,
id
, chown
, chgrp
, chmod
, groups
, sticky bit, stat
, User ID, USER
Dockerfile: FROM, RUN, CMD, ENTRYPOINT, WORKDIR, COPY, ADD, USER, ENV, ARG, HEALTHCHECK
, hadolint, LABEL, EXPOSE