`docker build` fails with "COPY failed: file not found in build context". Fix it.

BeginnerHands-onLive debugging tasks
Answer
docker build -t app -f docker/Dockerfile .     # context is "." (repo root), not docker/
cat .dockerignore                              # is the file excluded?

Paths in COPY are relative to the build context (the last argument), not to the Dockerfile's location, and files listed in .dockerignore are invisible to the build.

Key trick → Run from the repo root with -f path/to/Dockerfile, and check .dockerignore before anything else.

All Real-World Interview questions Roadmap: Interview readiness

More on Live debugging tasks