From 04f864368634eaf6c85c824a986cae5df1ff9058 Mon Sep 17 00:00:00 2001 From: panos Date: Wed, 2 Sep 2026 18:17:41 +0800 Subject: [PATCH] build: exclude .claude from the docker build context 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. --- .dockerignore | 1 + ops/devnet-morph/tests/test_devnet_config.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.dockerignore b/.dockerignore index 0ec45acbf..e4d93ad6c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,6 @@ prover/ .git/ +.claude/ contracts/node_modules/ gas-oracle/app/target/ node/build/ diff --git a/ops/devnet-morph/tests/test_devnet_config.py b/ops/devnet-morph/tests/test_devnet_config.py index 1b88cc38c..836c75091 100644 --- a/ops/devnet-morph/tests/test_devnet_config.py +++ b/ops/devnet-morph/tests/test_devnet_config.py @@ -17,6 +17,10 @@ def test_root_dockerignore_excludes_generated_build_outputs(self): "gas-oracle/app/target/", "node/build/", "ops/docker/.devnet/", + # Claude Code keeps its worktrees here; on a machine that has used + # one, this is the single largest directory in the repo and every + # image build would ship it as build context. + ".claude/", ): self.assertIn(generated_path, dockerignore)