Bird
0
0

Which Dockerfile command changes the user context for subsequent instructions and container runtime?

easy📝 Conceptual Q2 of 15
Docker - Security
Which Dockerfile command changes the user context for subsequent instructions and container runtime?
AUSER
BRUN
CCMD
DENTRYPOINT
Step-by-Step Solution
Solution:
  1. Step 1: Identify Dockerfile instructions

    RUN executes commands during build, CMD and ENTRYPOINT define runtime commands.
  2. Step 2: USER instruction

    USER sets the user for subsequent instructions and container runtime.
  3. Final Answer:

    USER -> Option A
  4. Quick Check:

    USER sets container user context [OK]
Quick Trick: USER sets container runtime user [OK]
Common Mistakes:
  • Confusing RUN with USER
  • Using CMD or ENTRYPOINT to set user

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes