Fix container restart loop caused by missing source files in entrypoint seed block#22
Draft
Copilot wants to merge 3 commits into
Draft
Fix container restart loop caused by missing source files in entrypoint seed block#22Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
The upstream nousresearch/hermes-agent:v2026.6.5 replaced tini with s6-overlay for PID 1 supervision, and added a backward-compat shim: ln -sf /init /usr/bin/tini Our entrypoint was calling `exec tini -g -- "$0" "$@"` which became `exec /init -g -- /usr/local/bin/entrypoint.sh gateway run`. s6-overlay treated `-g` as the CMD to run, so rc.init at line 91 tried to execute `-g` as a command -> not found -> container crashed -> restart loop. Fix: - Dockerfile: use `/init` as PID 1 via ENTRYPOINT ["/init", "/usr/local/bin/entrypoint.sh"] - entrypoint.sh: change shebang to #!/command/with-contenv bash so s6-overlay properly repopulates environment variables before our script runs; remove the tini-wrapping block that caused the crash
Copilot
AI
changed the title
[WIP] Fix version restart loop issue
Fix restart loop caused by tini→s6-overlay shim in upstream v2026.6.5
Jun 11, 2026
|
Dappnode bot has built and pinned the built packages to an IPFS node, for commit: 39d8385 This is a development version and should only be installed for testing purposes.
Hash: (by dappnodebot/build-action) |
Member
|
@copilot Not working. This comes up: |
The upstream .dockerignore excludes .env.example and *.md files from the image, so /opt/hermes/.env.example and /opt/hermes/docker/SOUL.md do not exist inside the container. With set -e in the entrypoint, the unconditional `cp` on a missing source causes the script to exit with an error, triggering a container restart loop. Mirror the upstream stage2-hook.sh `seed_one` pattern: add a `[ -f "$INSTALL_DIR/<src>" ]` guard to all three cp seed commands so they are silently skipped when the source file is absent.
Copilot
AI
changed the title
Fix restart loop caused by tini→s6-overlay shim in upstream v2026.6.5
Fix container restart loop caused by missing source files in entrypoint seed block
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The upstream
nousresearch/hermes-agent.dockerignoreexcludes.env.exampleand all*.mdfiles from the build context, so/opt/hermes/.env.exampleand/opt/hermes/docker/SOUL.mddon't exist in the image. Withset -eactive, the unconditionalcpagainst these missing sources aborts the entrypoint, triggering a restart loop.Changes
entrypoint.sh: Add[ -f "$INSTALL_DIR/<src>" ]guards to all three seedcpcommands, mirroring the upstreamstage2-hook.shseed_onepattern — skip silently if the source is absent rather than hard-failing:Applied to all three:
.env.example,cli-config.yaml.example, anddocker/SOUL.md. The upstream'sstage2-hook.shcont-init already handles seeding these files when they exist; our copies are a defensive fallback.