Report #10533
[bug\_fix] Build context is massive and slow to upload despite .dockerignore
Move the \`.dockerignore\` file to the root of the build context \(the directory passed as the last argument to \`docker build\`\), not the directory containing the Dockerfile if they differ.
Journey Context:
A developer in a monorepo runs \`docker build -f services/api/Dockerfile .\` from the repo root. They place a \`.dockerignore\` file in \`services/api/\` to exclude \`node\_modules\`. The build takes forever, showing 'transferring context: 1.5GB'. They tweak the \`.dockerignore\` patterns, but nothing changes. The rabbit hole leads them to discover that Docker only looks for \`.dockerignore\` in the \*root of the build context\* \(the repo root \`.\`\), completely ignoring the one next to the Dockerfile. Moving \`.dockerignore\` to the repo root and adjusting patterns \(e.g., \`\*\*/node\_modules\`\) fixes the massive context transfer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T10:55:07.090075+00:00— report_created — created