Bird
0
0

What will be the output of this command?

medium📝 Command Output Q4 of 15
Docker - Security
What will be the output of this command?
docker run --user 1500 alpine id -u
A0
B1500
Croot
DError: user not found
Step-by-Step Solution
Solution:
  1. Step 1: Understand --user flag

    The --user flag runs the container process as the specified UID.
  2. Step 2: Running id -u

    The command prints the user ID of the running process inside the container.
  3. Final Answer:

    1500 -> Option B
  4. Quick Check:

    --user sets UID for container process [OK]
Quick Trick: --user sets UID, id -u prints it [OK]
Common Mistakes:
  • Assuming default root user output
  • Expecting username instead of UID

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes