Skip to content

Commit 9d90e04

Browse files
authored
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 <io@richiejp.com>
1 parent 11f43ad commit 9d90e04

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.dockerignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,19 @@ backend/python/**/source
3030
# up compiled against whatever (likely older) commit the host had.
3131
backend/cpp/llama-cpp/llama.cpp
3232
backend/cpp/llama-cpp-*-build
33+
34+
# Rust backend build output (sources are tracked; target/ is generated)
35+
backend/rust/*/target
36+
37+
# Local-only artifacts that bloat the build context but the image never needs.
38+
# Saved image tarballs, locally-installed backends, the host-built binary, and
39+
# assorted tool/scratch dirs. None of these are git-tracked.
40+
backend-images
41+
local-backends
42+
local-ai
43+
.crush
44+
protoc
45+
tests
46+
47+
# Installed via npm inside the build stage; no need to ship the host copy.
48+
**/node_modules

0 commit comments

Comments
 (0)