Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

chore(docker): add .dockerignore to keep .git out of the image (#4909)

LearningCircuit7a7d5bf743f5
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000000..9b13287c94
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,50 @@
+# .dockerignore
+#
+# Primary purpose: keep the .git directory out of the build context and
+# the published image. .git carries the full commit history (author
+# emails, and anything ever committed then removed). The Dockerfile
+# copies selectively today (COPY src/, COPY pyproject.toml, ...), so .git
+# is not shipped currently -- this file makes that guarantee robust: a
+# future `COPY . .`, or a local build from a stale clone, would otherwise
+# embed the entire history into the image.
+#
+# Only files the Dockerfile explicitly COPYs are needed in the context;
+# everything below is either never copied or is regenerated in-image.
+
+# ── Version control ──────────────────────────────────────────────
+.git
+.gitignore
+.gitattributes
+.github
+
+# ── Python bytecode / caches / virtualenvs ───────────────────────
+**/__pycache__/
+**/*.py[cod]
+**/*$py.class
+.venv/
+venv/
+**/.pytest_cache/
+**/.ruff_cache/
+**/.mypy_cache/
+.coverage
+htmlcov/
+
+# ── Node (installed fresh in the image; the local copy is ~300 MB) ─
+**/node_modules/
+
+# ── Secrets, local databases, logs — never belong in an image ────
+**/.env
+**/.env.local
+**/.env.*.local
+**/*.log
+**/*.db
+**/*.sqlite
+**/*.sqlite3
+# ...but the checked-in defaults template IS part of the source the
+# build copies via `COPY src/` -- keep it.
+!**/.env.template
+
+# ── Editor / OS cruft ────────────────────────────────────────────
+.idea/
+.vscode/
+.DS_Store
diff --git a/.file-whitelist.txt b/.file-whitelist.txt
index fc8de7cd00..10ac69f255 100644
--- a/.file-whitelist.txt
+++ b/.file-whitelist.txt
@@ -90,6 +90,7 @@
^LICENSE$
^README$
^Dockerfile$
+^\.dockerignore$
^\.file-whitelist\.txt$
^\.github/security/.*\.txt$
diff --git a/.github/workflows/docker-tests.yml b/.github/workflows/docker-tests.yml
index 45a3275aeb..6db858c8fa 100644
--- a/.github/workflows/docker-tests.yml
+++ b/.github/workflows/docker-tests.yml
@@ -73,6 +73,7 @@ jobs:
- '.github/workflows/docker-tests.yml'
docker:
- 'Dockerfile'
+ - '.dockerignore'
- 'scripts/ldr_entrypoint.sh'
- 'scripts/ollama_entrypoint.sh'
- 'pyproject.toml'
diff --git a/.gitignore b/.gitignore
index 6a466b2605..f52325c565 100644
--- a/.gitignore
+++ b/.gitignore
@@ -119,6 +119,7 @@ src/local_deep_research/web/static/css/themes.css
!.github/security/*.txt
!.gitleaksignore
!.grype.yaml
+!.dockerignore
# Re-allow pre-commit hooks after the `.*/` catch-all (the earlier
# !.pre-commit-hooks/ block is overridden by `.*/` above, which is why
# new hook files land as ignored until this rule is re-applied here).