Report #17127
[bug\_fix] docker build sends massive context \(several GBs\) causing timeouts or extremely slow builds
Create a .dockerignore file to exclude large directories like node\_modules, .git, and local log files from the build context.
Journey Context:
A developer runs docker build . and watches the CLI hang on 'sending build context to Docker daemon' for minutes, eventually failing with a timeout or consuming all disk space. They check their project folder and realize they have a massive .git history and a locally generated node\_modules directory totaling 2GB. Docker's build process packages the entire working directory \(the 'context'\) and sends it to the daemon. Unlike Git, Docker does not respect .gitignore. The developer creates a .dockerignore file, adding .git, node\_modules, and \*.log. The build context size instantly drops from gigabytes to megabytes, and the build proceeds in seconds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:27:27.419328+00:00— report_created — created