🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Docker and Containers: all 10 questions

Quiz: Docker and Containers · Question 8 of 10

Why use a multi-stage build?

Why use a multi-stage build?

  1. A.The final image contains only the built output and runtime dependencies, not compilers and dev tools
  2. B.It makes the source code public
  3. C.It runs two containers at the same time
  4. D.It removes the need for a Dockerfile
Answer & explanation

Correct answer: The final image contains only the built output and runtime dependencies, not compilers and dev tools

Building in one stage and copying the result to a clean stage keeps production images small.

Can you get the rest right without peeking?

Take the timed Quiz: Docker and Containers quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →