← Quiz: Docker: all 10 questions
Quiz: Docker · Question 9 of 10
Why does the Dockerfile switch to USER app in the final stage?
Why does the Dockerfile switch to USER app in the final stage?
- A.Java requires a user named app
- B.It makes the image smaller
- C.So the app does not run as root inside the container, limiting damage if it is attacked
- D.To publish the port
Answer & explanation
Correct answer: So the app does not run as root inside the container, limiting damage if it is attacked
Running as a normal user is a basic container security rule.
Can you get the rest right without peeking?
Take the timed Quiz: Docker quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →