build: exclude .claude from the docker build context - #1060
Conversation
Claude Code keeps its git worktrees under .claude/worktrees. On a machine that has used one, .claude is 1.0 GB -- comparable to .git (1.1 GB) and prover (1.2 GB), both of which .dockerignore already excludes. Nothing under it is ever needed by a build, so every image build was shipping it as build context: ~3.0 GB transferred where ~2.0 GB is required.
|
Warning Review limit reachedNext included review available in 28 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Folding this into #1059 instead — same devnet-local build path, no reason to review it separately. |
Problem
Rebuilding
morph-node:latestlocally showed the build context climbing past 3 GB before a single build step ran..dockerignoreexcludes.git(1.1 GB) andprover/(1.2 GB), but not.claude/— which is 1.0 GB on any machine that has used a Claude Code worktree (.claude/worktrees):Nothing under
.claude/is ever read by a build, so everydocker compose buildshipped it: ~3.0 GB of context transferred where ~2.0 GB is required.Fix
One line in
.dockerignore, next to the other excluded top-level directories, plus the matching assertion in the existingtest_root_dockerignore_excludes_generated_build_outputs.python3 -m unittest discover -s ops/devnet-morph/tests— 12 tests, all pass.