Level 6 — Practical projects · wrap-up
Cheat sheet & self-check
7 questions across 2 lessons. Each answer links back to the lesson it came from.
Pick an answer to see if you got it, and why.
Q1. Why does only the front-end container publish a port?
Show answer
B. The browser talks to nginx; nginx forwards /api/ to backend:8000 over the user-defined network. The API and its database are never directly reachable from outside the host.
From lesson 12 · Project: Python front end + back endQ2. How does nginx find the back end?
Show answer
B. The back-end container has the network alias backend (in Compose, the service name). BACKEND_URL=http://backend:8000 is filled into the nginx config when the container starts.
From lesson 12 · Project: Python front end + back endQ3. The app works with curl on the host, but a colleague's laptop gets a timeout. Which is NOT a likely cause?
Show answer
D. The back end is supposed to be unpublished. Remote access depends on the front end being published on a reachable address and the firewall/security group allowing the port.
From lesson 12 · Project: Python front end + back endQ4. Why is the final .NET image based on aspnet:10.0 and not sdk:10.0?
Show answer
B. Multi-stage builds publish with the SDK and copy only the output into the runtime image: about 230 MB here instead of well over 1 GB.
From lesson 13 · Project: .NET front end + back end (Linux & Windows)Q5. The same Dockerfile.windows image won't start on a colleague's Windows host: 'The container operating system does not match the host operating system'. Why?
Show answer
B. Unlike Linux containers, Windows containers depend on the host's Windows build. Pick the base tag for the host (ltsc2022, ltsc2025) or run with --isolation=hyperv.
From lesson 13 · Project: .NET front end + back end (Linux & Windows)Q6. Can a Windows host in Windows-containers mode run the Linux images from this project?
Show answer
B. Docker Desktop switches the whole engine between Linux containers (in a WSL 2 / Hyper-V VM) and Windows containers. Build and run each variant in the matching mode.
From lesson 13 · Project: .NET front end + back end (Linux & Windows)Q7. How does the container health check work when the runtime image has no curl?
Show answer
B. Adding curl to the image just for health checks grows it and adds packages to patch. A few lines in the app do the same job on both Linux and Windows images.
From lesson 13 · Project: .NET front end + back end (Linux & Windows)