hermes - 💡(How to fix) Fix [Feature]: Build the docker image HERMES-AGENT takes a long time (very long time) [1 comments, 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#18966Fetched 2026-05-03 04:53:11
View on GitHub
Comments
1
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×3commented ×1

Code Example

echo "Updating hermes-agent repo to ${TAG}..."
cd "$REPO_DIR"
git fetch --tags origin
git checkout "${TAG}" || git checkout "tags/${TAG}" -b "build-${TAG}"

echo "============================================"
echo "Building ${DOCKER_USER}/hermes-agent:${TAG}"
echo "Platforms: linux/amd64, linux/arm64"
echo "============================================"

docker buildx build \
    --platform linux/amd64,linux/arm64 \
    --tag "${DOCKER_USER}/hermes-agent:${TAG}" \
    --tag "${DOCKER_USER}/hermes-agent:latest" \
    --file Dockerfile \
    --push \
    .

---

# slow — touches node_modules, .git, etc.
RUN chmod -R a+rX /opt/hermes

---

# Before (slow — touches node_modules, .git, etc.)
RUN chmod -R a+rX /opt/hermes

# After (faster — skips node_modules)
RUN find /opt/hermes -path '*/node_modules' -prune -o -exec chmod a+rX {} +

---

RUN chmod -R a+rX /opt/hermes/web /opt/hermes/ui-tui /opt/hermes/hermes_cli /opt/hermes/gateway /opt/hermes/skills

---
RAW_BUFFERClick to expand / collapse

Problem or Use Case

echo "Updating hermes-agent repo to ${TAG}..."
cd "$REPO_DIR"
git fetch --tags origin
git checkout "${TAG}" || git checkout "tags/${TAG}" -b "build-${TAG}"

echo "============================================"
echo "Building ${DOCKER_USER}/hermes-agent:${TAG}"
echo "Platforms: linux/amd64, linux/arm64"
echo "============================================"

docker buildx build \
    --platform linux/amd64,linux/arm64 \
    --tag "${DOCKER_USER}/hermes-agent:${TAG}" \
    --tag "${DOCKER_USER}/hermes-agent:latest" \
    --file Dockerfile \
    --push \
    .
# slow — touches node_modules, .git, etc.
RUN chmod -R a+rX /opt/hermes

Proposed Solution

# Before (slow — touches node_modules, .git, etc.)
RUN chmod -R a+rX /opt/hermes

# After (faster — skips node_modules)
RUN find /opt/hermes -path '*/node_modules' -prune -o -exec chmod a+rX {} +

Or limit to only the directories that need it:

RUN chmod -R a+rX /opt/hermes/web /opt/hermes/ui-tui /opt/hermes/hermes_cli /opt/hermes/gateway /opt/hermes/skills

Alternatives Considered

No response

Feature Type

Performance / reliability

Scope

Small (single file, < 50 lines)

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

extent analysis

TL;DR

Update the Dockerfile to use a more efficient chmod command that skips unnecessary directories, such as node_modules, to improve build performance.

Guidance

  • Replace the existing RUN chmod -R a+rX /opt/hermes command with the proposed solution: RUN find /opt/hermes -path '*/node_modules' -prune -o -exec chmod a+rX {} + to skip node_modules and improve build speed.
  • Alternatively, limit the chmod command to only the directories that require it, such as /opt/hermes/web, /opt/hermes/ui-tui, etc.
  • Verify the build performance improvement by measuring the build time before and after the change.
  • Test the updated Dockerfile to ensure that the application still functions as expected.

Example

# Updated Dockerfile command
RUN find /opt/hermes -path '*/node_modules' -prune -o -exec chmod a+rX {} +

Notes

The proposed solution assumes that the node_modules directory does not require the chmod command. If this is not the case, the alternative solution that limits the chmod command to specific directories may be more suitable.

Recommendation

Apply the workaround by updating the Dockerfile with the proposed solution, as it is a simple and effective way to improve build performance without introducing significant 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 - 💡(How to fix) Fix [Feature]: Build the docker image HERMES-AGENT takes a long time (very long time) [1 comments, 1 participants]