Fix the Broken Build
Debug a Dockerfile that fails to build and serves nothing.
A intermediate Docker challenge worth 10 points. Solve it hands-on in a real Docker environment in your browser - no local setup, no fake shells.
The Challenge
Scenario: The intern wrote the Dockerfile for the shop's static site in /root/webapp — the build fails outright.
Tasks:
- Read the build error carefully — the
COPYsource doesn't exist - There's a second bug: the destination path is misspelled (nginx serves from
/usr/share/nginx/html) - Build the fixed image as
shop:v1 - Run it as
shop, publishing 8081 → 80 — point the browser panel at port 8081: Mega Shop
Commands to learn: docker build -t, reading build errors, COPY
Run check when done.