🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Docker: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. What is the difference between an image and a container?
  2. Q2. Why use a multi-stage Dockerfile for a Spring Boot app?
  3. Q3. Inside Docker Compose, how does order-service reach Kafka?
  4. Q4. How does SPRINGKAFKABOOTSTRAPSERVERS affect the app?
  5. Q5. Why copy pom.xml and download dependencies before copying src?
  6. Q6. Why should a database container use a volume?
  7. Q7. What does -p 8081:8081 in docker run do?
  8. Q8. dependson: kafka is set for order-service in Compose. What does it guarantee?
  9. Q9. Why does the Dockerfile switch to USER app in the final stage?
  10. Q10. Why are containers lighter than virtual machines?