Skip to content

fix(dct-init): find docker in Rancher Desktop's own folder when PATH is stale - #106

Merged
terchris merged 2 commits into
mainfrom
fix/dct-init-docker-fallback
Sep 25, 2026
Merged

terchris merged 2 commits into
mainfrom
fix/dct-init-docker-fallback

Conversation

@terchris

Copy link
Copy Markdown
Collaborator

From client-provisioning's question on urb-agents #1543. Their installer installs Rancher Desktop and then calls dct-init in one process, so PATH is stale, and dct-init would wrongly say ERR002 (Rancher installed but not visible). dct-init now looks on PATH first, then where Rancher puts docker, and uses that full path for docker info / docker pull.

Platform Where it looks Basis
Windows <install>\resources\resources\win32\bin\docker.exe under %LOCALAPPDATA%\Programs\Rancher Desktop and %ProgramFiles%\Rancher Desktop the path client-provisioning's tested scripts use; matches Rancher's source (paths.ts)
Mac ~/.rd/bin/docker, then the app bundle ~/.rd/bin measured on a Mac; the bundle path is inferred from the source
Linux /opt/rancher-desktop/resources/resources/linux/bin/docker inferred from the source

Tests: a new stale-PATH case in CI.

  • Windows: a stub docker.exe, compiled with Add-Type, sits in Rancher's bin folder, with no docker on PATH.
  • Linux: docker only in ~/.rd/bin.
  • Locally: bash passes, and shellcheck / actionlint / PSScriptAnalyzer are clean.

🤖 Generated with Claude Code

terchris and others added 2 commits September 25, 2026 18:01
…is stale

client-provisioning's installer installs Rancher Desktop and calls dct-init
in one process, so PATH does not yet contain Rancher's bin folder and
dct-init would wrongly report ERR002 (urb-agents #1543). dct-init now looks
on PATH first, then where Rancher puts docker, and uses that full path:
- Windows: <install>\resources\resources\win32\bin\docker.exe (per-user and
  machine installs; the path client-provisioning's tested scripts use)
- Mac: ~/.rd/bin/docker (measured), then the app bundle; Linux: /opt/rancher-desktop
CI: a stale-PATH case on windows-latest (a stub docker.exe compiled with
Add-Type in Rancher's bin folder) and on Linux (~/.rd/bin).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ask 3.2)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@terchris
terchris merged commit dd2ebe5 into main Sep 25, 2026
10 checks passed
@terchris
terchris deleted the fix/dct-init-docker-fallback branch September 25, 2026 17:59
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.

1 participant