Skip to content

fix(adapters): probe Docker daemon with docker version --format '{{.Server.Version}}' - #422

Open
santhiprakash wants to merge 2 commits into
oblien:mainfrom
santhiprakash:fix/docker-health-ssh-exec-408
Open

fix(adapters): probe Docker daemon with docker version --format '{{.Server.Version}}'#422
santhiprakash wants to merge 2 commits into
oblien:mainfrom
santhiprakash:fix/docker-health-ssh-exec-408

Conversation

@santhiprakash

@santhiprakash santhiprakash commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix Docker health check false negatives on SSH-added external servers running Docker 29 by replacing the docker info --format '{{.ServerVersion}}' probe with docker version --format '{{.Server.Version}}'.

Motivation

Closes #408.

On SSH-added servers running Docker 29, the Components tab reported Docker as unhealthy ("daemon not running") even though docker info and docker ps worked from the interactive Terminal tab. The root cause is that Docker 29 no longer exposes the .ServerVersion template field in docker info, so the daemon probe exited with a template error (template: no such field: .ServerVersion).

Related issue

Closes #408

Changes

  • packages/adapters/src/system/catalog.ts — change daemonCommand from docker info --format '{{.ServerVersion}}' to docker version --format '{{.Server.Version}}', which is the documented, stable server-version field across Docker 24-29+.
  • packages/adapters/src/system/docker-check.test.ts — update test needles and the daemon-command assertion to match the new probe and still verify that the probe targets a real server version.
  • packages/adapters/docs/SYSTEM.md — update the setup-flow diagram to show the new docker version probe.

Problem

Concrete repro from #408: add an external server over password-auth SSH where Docker 29.7.1 is installed and running. The Components tab health check calls checkDocker() -> tryExec(executor, recipe.daemonCommand!) with docker info --format '{{.ServerVersion}}'. On Docker 29 this produces template: no such field: .ServerVersion, so tryExec() returns an empty output and checkDocker() reports the daemon as not running.

Triage / Root cause

Docker 29 removed the .ServerVersion field from the docker info Go-template context. docker version --format '{{.Server.Version}}' is the documented cross-version way to read the server version.

Fix

Use docker version --format '{{.Server.Version}}'. It contacts the daemon and returns a positive server-version signal, so checkDocker() treats any non-empty output as "daemon running" and surfaces the underlying error on failure.

Verification

cd packages/adapters && bun test src/system/docker-check.test.ts
# 7 pass, 0 fail

Also verified locally on Docker 29.1.3:

$ docker --version
Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
$ docker info --format '{{.ServerVersion}}'
docker: template: no such field: .ServerVersion
$ docker version --format '{{.Server.Version}}'
29.1.3

Notes / Risks

  • Scope is limited to the daemon probe string and its tests; no changes to SshExecutor or checkDocker() control flow.
  • The old command still works on Docker <29, but docker version --format '{{.Server.Version}}' is available across Docker 24-29+.

Checklist

  • One change per PR — one bug, or one agreed feature, with nothing unrelated bundled in
  • The diff is scoped — no reformatting or lint fixes on lines I wasn't otherwise changing
  • A test fails without this change and passes with it (or I explained above why there isn't one)
  • bun run test, bun run --cwd <workspace> lint, and bun format all pass locally
  • I understand every line of this diff and can explain it in review

@santhiprakash
santhiprakash force-pushed the fix/docker-health-ssh-exec-408 branch from 53fcd19 to 4e8ad45 Compare August 4, 2026 23:16
…Server.Version}}'`

Docker 29 removed the `.ServerVersion` template field from `docker info`, so
`docker info --format '{{.ServerVersion}}'` exits with a template error
("no such field: .ServerVersion") on healthy Docker 29+ daemons. This made the
Components tab mark Docker as Unhealthy on external SSH servers running Docker 29.

Switch the daemon probe to `docker version --format '{{.Server.Version}}'`, which
is the documented, stable server-version field across Docker 24-29+. Update
`docker-check.test.ts` to match the new command and assert it still targets a real
server version.

Closes oblien#408.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@santhiprakash
santhiprakash force-pushed the fix/docker-health-ssh-exec-408 branch from 4e8ad45 to 7b76592 Compare August 5, 2026 00:56
@santhiprakash santhiprakash changed the title fix(adapters): avoid single-quoted docker daemon probe over SSH exec fix(adapters): probe Docker daemon with docker version --format '{{.Server.Version}}' Aug 5, 2026
`secrets` is not a supported context in step `if` conditionals, so the
`e2e-docker` job's `if: ${{ secrets.DOCKERHUB_USERNAME != '' }}` caused the
workflow to fail validation before any job could start (run 30964881693).

Move the secret values into job-level `env` and switch the step `if` to
`env.DOCKERHUB_USERNAME`. This keeps the existing skip-when-unset behavior:
when the secret is missing the env is empty and the login step is skipped,
so Docker Hub pulls fall back to the anonymous rate limit path. When the
secret is configured, the step runs with the existing `with` inputs.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
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.

Docker health check shows Unhealthy on external server added via SSH (password auth) despite Docker running normally

1 participant