Interview Prep/Docker/Build failures and cache problems

`unable to prepare context: path "." not found` or build context transfer is 3 GB and takes forever.

BeginnerTroubleshootingBuild failures and cache problems
Answer

Likely causes → Context includes node_modules, .git, datasets, or you ran the build in the home directory.

Diagnose → du -sh * | sort -h | tail; BuildKit prints transferring context: 3.1GB.

Fix → Build from the project directory, add .dockerignore.

Prevent → Allow-list style ignore: * then !src.

All Docker questions Roadmap: Docker & containers

More on Build failures and cache problems