From 9d90e044186c8dddeeea83e5526bc6a658917449 Mon Sep 17 00:00:00 2001 From: Richard Palethorpe Date: Tue, 26 May 2026 21:01:50 +0100 Subject: [PATCH] fix(dockerignore): exclude local-only artifacts from build context (#10015) The build context shipped to the daemon included several large untracked directories the image never needs: saved image tarballs (backend-images), locally-installed backends (local-backends), the host-built binary (local-ai), the rust target/ build output, and host node_modules/protoc/tests. This bloated the context to ~23GB. Exclude them so only the sources the Dockerfile actually copies are transferred. backend/rust sources stay tracked; only target/ is ignored. Assisted-by: Claude:claude-opus-4-7 [Claude Code] Signed-off-by: Richard Palethorpe --- .dockerignore | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.dockerignore b/.dockerignore index e8904d3be..35015e233 100644 --- a/.dockerignore +++ b/.dockerignore @@ -30,3 +30,19 @@ backend/python/**/source # up compiled against whatever (likely older) commit the host had. backend/cpp/llama-cpp/llama.cpp backend/cpp/llama-cpp-*-build + +# Rust backend build output (sources are tracked; target/ is generated) +backend/rust/*/target + +# Local-only artifacts that bloat the build context but the image never needs. +# Saved image tarballs, locally-installed backends, the host-built binary, and +# assorted tool/scratch dirs. None of these are git-tracked. +backend-images +local-backends +local-ai +.crush +protoc +tests + +# Installed via npm inside the build stage; no need to ship the host copy. +**/node_modules