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

Quiz: Docker · Question 2 of 10

Why use a multi-stage Dockerfile for a Spring Boot app?

Why use a multi-stage Dockerfile for a Spring Boot app?

  1. A.Docker requires at least two stages
  2. B.The final image contains only the JRE and jar, not the JDK, Maven or source code
  3. C.It runs the tests twice
  4. D.It makes the jar file larger
Answer & explanation

Correct answer: The final image contains only the JRE and jar, not the JDK, Maven or source code

Smaller, faster to ship and with less attack surface.

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 →