Report #55691
[bug\_fix] Massive build context sent to the daemon despite adding directories to \`.dockerignore\`.
Convert the \`.dockerignore\` file to use Unix LF line endings instead of Windows CRLF.
Journey Context:
A developer notices \`docker build\` takes 5 minutes just to send the build context. They add \`node\_modules\` and \`.git\` to their \`.dockerignore\` file, but the context size doesn't decrease. They double-check the syntax, try absolute paths, and even delete and recreate the file, but nothing works. They finally run \`cat -A .dockerignore\` and see \`^M\` \(carriage return\) characters at the end of every line. Because the file was created or edited on a Windows machine, it has CRLF line endings. The Docker daemon parses the \`\\r\` as part of the pattern, so it looks for \`node\_modules\\r\` instead of \`node\_modules\`, failing to match anything. Converting the file to LF line endings instantly fixes the context exclusion.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:58:18.232458+00:00— report_created — created