Which user instruction changes the user name or UID and group name or GID to use when running subsequent instructions in the Containerfile?
USER sets the user name, UID, group name and GID applied when running subsequent RUN, CMD and ENTRYPOINT instructions, plus the container's runtime identity. It changes execution identity only, not file ownership, which requires separate handling.
Why this answer
The USER instruction sets the user name or UID to use for running the image and for any RUN, CMD and ENTRYPOINT instructions that follow it.