hermes-bsd/.dockerignore

108 lines
1.8 KiB
Text
Raw Normal View History

# Git
.git
.gitignore
.gitmodules
# Python
__pycache__
*.py[cod]
*$py.class
*.so
.Python
*.egg-info/
dist/
build/
# Virtual environments
venv/
env/
ENV/
2026-03-30 15:29:06 -05:00
# Dependencies
node_modules
**/node_modules
.venv
**/.venv
.notebooklm-cli-venv/
.notebooklm-playwright/
.pip-cache/
.uv-cache/
2026-05-01 16:29:46 +10:00
# Built artifacts that are regenerated inside the image. Excluded so local
# rebuilds on the developer's machine don't invalidate the npm-install layer
# that now depends on the full ui-tui/packages/hermes-ink/ tree being present.
ui-tui/dist/
ui-tui/packages/hermes-ink/dist/
2026-03-30 15:29:06 -05:00
# CI/CD
.github
2026-03-30 15:29:06 -05:00
# Environment files
.env
.env.*
# IDE
.vscode/
.idea/
*.swp
*.swo
# Testing
.pytest_cache/
.coverage
htmlcov/
# Documentation
*.md
# Runtime data (bind-mounted at /opt/data; must not leak into build context)
data/
.hermes-docker/
.notebooklm-home/
# Compose/profile runtime state (bind-mounted; avoid ownership/secret issues)
hermes-config/
runtime/
fix(docker): optimize image size — .dockerignore, drop dev deps, split build layers (#38749) * fix(docker): optimize image size with .dockerignore, drop dev deps, split build layers Three changes to reduce the Docker image size and speed up rebuilds: 1. .dockerignore — exclude ~69 MB of files that are never needed inside the container: apps/ (desktop Tauri source), tests/, website/ (Docusaurus), docs/, infographic/, nix/, plans/, packaging/, and various dotfiles (.envrc, .hadolint.yaml, .mailmap, etc.). The existing .dockerignore already covered node_modules and .git; these additions prevent the remaining non-runtime content from inflating both the build context and the final image (COPY . .). 2. pyproject.toml — add a [docker] extra that mirrors [all] but omits [dev] (debugpy, pytest, pytest-asyncio, pytest-timeout, ty, ruff, setuptools). The published image doesn't need test/debug tooling. Estimated savings: ~30-50 MB of Python packages. 3. Dockerfile — use --extra docker instead of --extra all in the uv sync layer. Also split the COPY + npm run build so that the web/ and ui-tui/ frontend builds are cached independently from Python source changes (COPY . .). A Python-only commit no longer invalidates the (slower) frontend build layer. Note: the build-only apt packages (gcc, python3-dev, libffi-dev, libolm-dev) are still installed in the final image. Removing them requires a true multi-stage build (builder → runtime), which is a larger refactor tracked separately. * fix(docker): remove redundant [docker] extra, revert to --extra all The [docker] extra was identical to [all] on main — the PR had added [dev] to [all] then created [docker] as [all] minus [dev], a no-op round-trip. Revert [all] to its original form and drop the [docker] extra. Keep the .dockerignore additions and frontend build layer reordering.
2026-06-10 03:08:00 -07:00
# ---------- Not needed inside the Docker image ----------
# Desktop app source (Tauri/Electron); never installed in the container
apps/
# Test suite — not shipped in production images
tests/
# Documentation site (Docusaurus) and supplementary docs
website/
docs/
# Assets only used by the GitHub README
assets/
infographic/
# Plugin-level docs (hermes-achievements ships docs/ but the runtime doesn't read them)
plugins/hermes-achievements/docs/
# Nix / Homebrew / AUR packaging metadata — irrelevant to Docker
nix/
flake.nix
flake.lock
packaging/
# Design and planning documents
plans/
.plans/
# ACP registry manifest (icon + agent.json) — not consumed at runtime
acp_registry/
# Repo-level dotfiles that are git-only or dev-tooling config
.env.example
.envrc
.gitattributes
.hadolint.yaml
.mailmap
# Top-level LICENSE (not matched by *.md); not needed inside the container
LICENSE