Skip to content

feat(docker): bake herdr + tmux into webtop image - #38

Merged
gitricko merged 1 commit into
mainfrom
fm/ship-task-bake-herdr-tmux-into-the-hermes-webtop
Aug 17, 2026
Merged

feat(docker): bake herdr + tmux into webtop image#38
gitricko merged 1 commit into
mainfrom
fm/ship-task-bake-herdr-tmux-into-the-hermes-webtop

Conversation

@gitricko

@gitricko gitricko commented Aug 17, 2026

Copy link
Copy Markdown
Owner

What Changed

  • Added a pinned, SHA-256-verified installation of the herdr session backend (v0.7.4, protocol-16 family) into the Docker image via a new build script (docker/scripts/fm-install-herdr.sh) that downloads the official GitHub release asset bounded by max size and verifies version/protocol gates after install.
  • Added tmux and jq to the apt-installed utilities in the Dockerfile; tmux serves as the fallback session backend and jq parses herdr's JSON status protocol.
  • Introduced a HERDR_VERSION build ARG that the Docker build enforces against the installed binary version after running the install script.

Risk Assessment

✅ Low: Well-bounded Docker/build change that bakes a pinned, SHA-256-verified herdr binary plus tmux/jq into the image with version/protocol gates and correct multi-arch handling, presenting little ambiguity or risk.

Testing

Exercised the new herdr install step on Linux/aarch64: the fm-install-herdr.sh script the Dockerfile runs completed end-to-end (pinned 0.7.4 asset downloaded, SHA-256 verified, installed, version 0.7.4 and protocol 16 gates passed), and herdr --version reports 0.7.4 matching the Dockerfile bump guard. A tampered-checksum run proved the SHA gate fails closed (exit 1). I could not build the full container image because the docker daemon is inaccessible in this sandbox, so in-image confirmation of the tmux/jq apt addition and /usr/local/bin placement is left to the remote docker-publish CI build.

Evidence: herdr installer positive run (transcript)

fm-install-herdr.sh: downloading herdr-linux-aarch64 from https://github.com/ogulcancelik/herdr/releases/download/v0.7.4/herdr-linux-aarch64
fm-install-herdr.sh: installed herdr 0.7.4 (protocol 16) to /tmp/herdr-test-bin/herdr herdr 0.7.4

fm-install-herdr.sh: downloading herdr-linux-aarch64 from https://github.com/ogulcancelik/herdr/releases/download/v0.7.4/herdr-linux-aarch64
fm-install-herdr.sh: installed herdr 0.7.4 (protocol 16) to /tmp/herdr-test-bin/herdr
herdr 0.7.4
Evidence: version bump-guard + SHA gate evidence

Dockerfile ARG HERDR_VERSION=0.7.4; installed herdr --version = herdr 0.7.4 (matches); tampered-checksum installer exit = 1 (rejects mismatch)

=== Dockerfile ARG HERDR_VERSION line ===
ARG HERDR_VERSION=0.7.4
# HERDR_VERSION is a bump guard: it must match the pin inside scripts/fm-install-herdr.sh
ARG HERDR_VERSION
    test "$(/usr/local/bin/herdr --version | awk '{print $2; exit}')" = "${HERDR_VERSION}"; \
=== installed binary ===
-rwxr-xr-x 1 abc dialout 17438024 Aug 17 15:55 /tmp/herdr-test-bin/herdr
=== herdr --version (matches bump guard ARG) ===
herdr 0.7.4
=== negative SHA gate: tampered-script exit code ===
exit=1
- Outcome: ⚠️ 1 warning across 1 run (1m46s)

Pipeline

Updates from git push no-mistakes

⏭️ **intent** - skipped

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 warning
  • ⚠️ Could not complete the end-to-end 'baked into image' verification. The docker daemon is not accessible in this sandbox (docker info returns 'permission denied ... /var/run/docker.sock'), so the full webtop image could not be built to visually confirm tmux and jq are installed by the modified apt line and that the herdr binary lands at /usr/local/bin inside the container. The substantive new behavior (fm-install-herdr.sh) was proven directly on the host, but in-container confirmation of the apt step and PATH placement relies on the remote docker-publish CI build.
  • bash docker/scripts/fm-install-herdr.sh /tmp/herdr-test-bin (positive path on Linux aarch64 — download, SHA verify, install, version+protocol gates) → exit 0, 'installed herdr 0.7.4 (protocol 16)'
  • /tmp/herdr-test-bin/herdr --version → 'herdr 0.7.4', matching Dockerfile ARG HERDR_VERSION=0.7.4 bump guard
  • /tmp/herdr-test-bin/herdr status --json → client protocol 16 (>= required floor 16)
  • Negative SHA gate: copied script with aarch64 SHA256 set to 0000... → exit 1 with 'checksum mismatch'
  • grep Dockerfile for ARG HERDR_VERSION=0.7.4 and installer pin FM_HERDR_CI_VERSION=0.7.4 to confirm bump-guard consistency
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Copilot AI lite review requested due to automatic review settings August 17, 2026 14:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gitricko gitricko changed the title feat: bake herdr + tmux into image (firstmate crew backend) feat(docker): bake herdr + tmux into webtop image Aug 17, 2026
Add firstmate's pinned herdr session backend (primary fm-spawn pane
backend) plus tmux fallback and jq (herdr JSON protocol):

- docker/Dockerfile: pin ARG HERDR_VERSION=0.7.4 (bump guard vs the
  installer pin), add tmux + jq to the apt install line, and install
  herdr via firstmate's own pinned installer copied into the image
  (exact release asset, SHA-256 verified, bounded download). Binary
  lands in /usr/local/bin like mnemon/ollama/node, so it is on PATH
  for every shell and is not shadowed by the runtime /config volume.
- docker/scripts/fm-install-herdr.sh: verbatim copy of firstmate's
  bin/fm-install-herdr.sh (single owner of the herdr version/protocol
  pin), run at build time against the ./docker build context.
@gitricko
gitricko force-pushed the fm/ship-task-bake-herdr-tmux-into-the-hermes-webtop branch from 868d915 to 981ace1 Compare August 17, 2026 16:58
@gitricko
gitricko merged commit 1fee858 into main Aug 17, 2026
4 checks passed
@gitricko
gitricko deleted the fm/ship-task-bake-herdr-tmux-into-the-hermes-webtop branch August 17, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants