Skip to content

build: exclude .claude from the docker build context - #1060

Closed
panos-xyz wants to merge 1 commit into
mainfrom
fix/dockerignore-exclude-claude-dir
Closed

build: exclude .claude from the docker build context#1060
panos-xyz wants to merge 1 commit into
mainfrom
fix/dockerignore-exclude-claude-dir

Conversation

@panos-xyz

Copy link
Copy Markdown
Contributor

Problem

Rebuilding morph-node:latest locally showed the build context climbing past 3 GB before a single build step ran. .dockerignore excludes .git (1.1 GB) and prover/ (1.2 GB), but not .claude/ — which is 1.0 GB on any machine that has used a Claude Code worktree (.claude/worktrees):

repo total                     6125 MB
  .git                         1094 MB   (excluded)
  prover                       1205 MB   (excluded)
  .claude                      1010 MB   ← not excluded
  contracts/node_modules        718 MB   (excluded)

Nothing under .claude/ is ever read by a build, so every docker compose build shipped 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 existing test_root_dockerignore_excludes_generated_build_outputs.

python3 -m unittest discover -s ops/devnet-morph/tests — 12 tests, all pass.

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.
@panos-xyz
panos-xyz requested a review from a team as a code owner September 2, 2026 10:18
@panos-xyz
panos-xyz requested review from dylanCai9 and removed request for a team September 2, 2026 10:18
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 46aa7742-fd73-4425-9a78-6cd2ff268b8b

📥 Commits

Reviewing files that changed from the base of the PR and between bb68fe1 and 04f8643.

📒 Files selected for processing (2)
  • .dockerignore
  • ops/devnet-morph/tests/test_devnet_config.py

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@panos-xyz

Copy link
Copy Markdown
Contributor Author

Folding this into #1059 instead — same devnet-local build path, no reason to review it separately.

@panos-xyz panos-xyz closed this Sep 2, 2026
@panos-xyz
panos-xyz deleted the fix/dockerignore-exclude-claude-dir branch September 2, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant