Learning paths / Containers / Containerize a real app

Check: containerizing

Knowledge check · 5 min · Module 8, lesson 6 of 65 min left in this module

Module 8 · Containerize a real appLesson 6 of 6

Goal: Confirm you can design a health endpoint, read a containerizing Dockerfile's choices, and say what a Compose health condition waits for.

Four questions: three on Module 8 and one from Module 6. Every answer explains itself, right or wrong.

Your app can't serve any page without its database. What should /healthz do when the database is unreachable?
In a two-stage Dockerfile, the first stage runs npm ci or pip install, or compiles the code. Why not do that in the final image?
docker image inspect prints an empty User for an image you just built. What does that mean?
From Module 6: in compose.yaml, web has depends_on db with condition: service_healthy. What does web wait for?

Retry as often as you like.