feat(docker): add Docker container for the agent (salvage #1841) (#3668)
Adds a complete Docker packaging for Hermes Agent:
- Dockerfile based on debian:13.4 with all deps
- Entrypoint that bootstraps .env, config.yaml, SOUL.md on first run
- CI workflow to build, test, and push to DockerHub
- Documentation for interactive, gateway, and upgrade workflows
Closes #850, #913.
Changes vs original PR:
- Removed pre-created legacy cache/platform dirs from entrypoint
(image_cache, audio_cache, pairing, whatsapp/session) — these are
now created on demand by the application using the consolidated
layout from get_hermes_dir()
- Moved docs from docs/docker.md to website/docs/user-guide/docker.md
and added to Docusaurus sidebar
Co-authored-by: benbarclay <benbarclay@users.noreply.github.com>
2026-03-28 22:21:48 -07:00
|
|
|
# Git
|
|
|
|
|
.git
|
|
|
|
|
.gitignore
|
|
|
|
|
.gitmodules
|
|
|
|
|
|
2026-06-05 07:53:42 +08:00
|
|
|
# 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
|
2026-04-28 13:11:47 -07:00
|
|
|
**/node_modules
|
2026-04-13 12:28:57 +03:00
|
|
|
.venv
|
2026-04-28 13:11:47 -07:00
|
|
|
**/.venv
|
2026-05-15 09:23:14 +09:00
|
|
|
.notebooklm-cli-venv/
|
|
|
|
|
.notebooklm-playwright/
|
|
|
|
|
.pip-cache/
|
|
|
|
|
.uv-cache/
|
2026-03-30 15:19:52 -05:00
|
|
|
|
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:19:52 -05:00
|
|
|
|
2026-03-30 15:29:06 -05:00
|
|
|
# Environment files
|
2026-03-30 15:19:52 -05:00
|
|
|
.env
|
2026-06-05 07:53:42 +08:00
|
|
|
.env.*
|
|
|
|
|
|
|
|
|
|
# IDE
|
|
|
|
|
.vscode/
|
|
|
|
|
.idea/
|
|
|
|
|
*.swp
|
|
|
|
|
*.swo
|
|
|
|
|
|
|
|
|
|
# Testing
|
|
|
|
|
.pytest_cache/
|
|
|
|
|
.coverage
|
|
|
|
|
htmlcov/
|
2026-03-30 15:19:52 -05:00
|
|
|
|
2026-06-05 07:53:42 +08:00
|
|
|
# Documentation
|
2026-03-30 15:19:52 -05:00
|
|
|
*.md
|
2026-04-22 16:33:58 +08:00
|
|
|
|
|
|
|
|
# Runtime data (bind-mounted at /opt/data; must not leak into build context)
|
|
|
|
|
data/
|
2026-05-15 09:23:14 +09:00
|
|
|
.hermes-docker/
|
|
|
|
|
.notebooklm-home/
|
2026-04-24 20:15:28 +03:00
|
|
|
|
|
|
|
|
# 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
|