hermes - ✅(Solved) Fix Exclude compose/profile runtime state from Docker build context [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#15221Fetched 2026-04-25 06:23:39
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3cross-referenced ×1

The default Docker build context should exclude local runtime state directories used by compose/profile setups, such as hermes-config/ and runtime/.

This is a hygiene request to reduce accidental secret/runtime-state inclusion in Docker build context and avoid rebuild failures caused by host-side runtime file ownership.

Root Cause

Compose/profile setups commonly keep runtime state outside the image and mount it into the container. Those directories can contain:

  • config files and auth/session state;
  • local runtime databases/logs/cache;
  • files owned by the container runtime user;
  • user/private deployment artifacts.

Including those directories in Docker build context is unnecessary and can cause:

  • slow builds;
  • accidental local data exposure to the build context;
  • rebuild failures when the Docker client cannot read runtime-owned files.

Fix Action

Fixed

PR fix notes

PR #15263: fix(docker): exclude compose/profile runtime state from build context

Description (problem / solution / changelog)

Summary

Add hermes-config/ and runtime/ to .dockerignore to prevent local compose/profile runtime state from leaking into Docker build context.

Fixes #15221

Why

Compose/profile setups keep runtime state (config, auth, session data) outside the image via bind mounts. Including these directories in the build context causes:

  • Slower builds
  • Potential secret/local data exposure
  • Rebuild failures when Docker can't read container-runtime-owned files

Changes

  • Added hermes-config/ and runtime/ to .dockerignore

Testing

  • Existing source files required for image builds are unaffected
  • Safe for users who don't use those directories (no-op)

Changed files

  • .dockerignore (modified, +4/-0)

Code Example

# Runtime data (bind-mounted at /opt/data; must not leak into build context)
data/

---

hermes-config/
runtime/
RAW_BUFFERClick to expand / collapse

Summary

The default Docker build context should exclude local runtime state directories used by compose/profile setups, such as hermes-config/ and runtime/.

This is a hygiene request to reduce accidental secret/runtime-state inclusion in Docker build context and avoid rebuild failures caused by host-side runtime file ownership.

Why this matters

Compose/profile setups commonly keep runtime state outside the image and mount it into the container. Those directories can contain:

  • config files and auth/session state;
  • local runtime databases/logs/cache;
  • files owned by the container runtime user;
  • user/private deployment artifacts.

Including those directories in Docker build context is unnecessary and can cause:

  • slow builds;
  • accidental local data exposure to the build context;
  • rebuild failures when the Docker client cannot read runtime-owned files.

Current behavior in vanilla Hermes

.dockerignore excludes data/, but does not exclude common compose/profile runtime directories such as hermes-config/ or runtime/.

# Runtime data (bind-mounted at /opt/data; must not leak into build context)
data/

Requested behavior

Add common runtime-state directories to .dockerignore, for example:

hermes-config/
runtime/

Suggested acceptance criteria

  • Docker build context excludes local compose/profile runtime state.
  • Existing source files required for image builds are unaffected.
  • The change is safe for users who do not use those directories.

extent analysis

TL;DR

Update the .dockerignore file to exclude common runtime-state directories like hermes-config/ and runtime/ to prevent accidental inclusion in the Docker build context.

Guidance

  • Identify and list all common runtime-state directories used by compose/profile setups that should be excluded from the Docker build context.
  • Add these directories to the .dockerignore file, ensuring the format is correct and each directory is on a new line.
  • Verify the change by checking the Docker build context after updating the .dockerignore file to confirm the specified directories are excluded.
  • Test the build process with the updated .dockerignore file to ensure it does not break existing builds and that required source files are still included.

Example

# Runtime data (bind-mounted at /opt/data; must not leak into build context)
data/
hermes-config/
runtime/

Notes

This solution assumes that the directories to be excluded are known and can be explicitly listed in the .dockerignore file. If the directories are dynamically named or located, a more complex solution may be required.

Recommendation

Apply the workaround by updating the .dockerignore file as suggested, because it directly addresses the issue of accidental inclusion of runtime-state directories in the Docker build context without requiring any version upgrades or significant code changes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Exclude compose/profile runtime state from Docker build context [1 pull requests, 1 participants]