Skip to content

fix(setup): detect OrbStack vs Docker Desktop before relaunching the daemon - #6250

Closed
BohdanVilischuk wants to merge 2 commits into
simstudioai:stagingfrom
BohdanVilischuk:fix/orbstack-docker-launch
Closed

fix(setup): detect OrbStack vs Docker Desktop before relaunching the daemon#6250
BohdanVilischuk wants to merge 2 commits into
simstudioai:stagingfrom
BohdanVilischuk:fix/orbstack-docker-launch

Conversation

@BohdanVilischuk

@BohdanVilischuk BohdanVilischuk commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

The setup wizard (bun run setup) only knew how to relaunch Docker
Desktop when Docker wasn't running. If you use OrbStack instead, it
tried to open an app that isn't installed, waited 90 seconds, then
failed with a confusing error about Docker Desktop's license screen —
even though Docker itself works fine through OrbStack.

Why this matters

OrbStack is a common, lighter-weight alternative to Docker Desktop on
macOS (this repo's own setup script even suggests installing it).
Anyone using it currently hits a dead end in the setup wizard instead
of a working local environment.

What changed

The wizard now checks which Docker app is actually installed —
OrbStack or Docker Desktop — and launches and refers to the right one.
OrbStack users get a working "start Docker for me" prompt instead of
an error pointing them at an app they don't have.

Fixes #(issue)

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

How has this been tested? What should reviewers focus on?

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

…daemon

ensureDocker() always ran `open -a Docker` to relaunch a stopped daemon on
macOS, which silently no-ops for OrbStack users (no Docker.app bundle
exists), leading to a misleading "GUI license acceptance" timeout error.
Now it checks the docker CLI's active context first (accurate regardless
of install location) and falls back to checking for OrbStack.app, so the
wizard launches and messages the app that's actually installed.
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

@BohdanVilischuk is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Changes only affect the local setup wizard’s macOS Docker relaunch path; no runtime or production behavior.

Overview
On macOS, when the Docker daemon is down but the CLI is installed, the setup wizard no longer always assumes Docker Desktop. It picks OrbStack or Docker via docker context show (with a fallback to which .app exists), then uses that app name in the confirm prompt, open -a, spinner text, and timeout errors—including OrbStack-specific first-run guidance instead of Docker Desktop’s license message.

Reviewed by Cursor Bugbot for commit bf93e19. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR updates the macOS setup wizard to detect and launch OrbStack or Docker Desktop and tailor its prompts and timeout guidance accordingly.

  • Adds active-context and application-bundle detection.
  • Uses the selected provider throughout launch prompts, spinner text, and first-run errors.
  • The fallback can incorrectly prefer OrbStack over an active Docker Desktop context when both applications are installed.

Confidence Score: 4/5

The provider-selection fallback should be corrected before merging because installations containing both apps can launch OrbStack while the Docker CLI continues waiting for Docker Desktop.

The new filesystem fallback treats OrbStack's mere installation as authoritative after receiving any non-OrbStack active context, causing the wizard to launch and diagnose the wrong daemon provider.

Files Needing Attention: scripts/setup/docker.ts

Important Files Changed

Filename Overview
scripts/setup/docker.ts Adds provider-aware macOS daemon startup, but the app-bundle fallback overrides non-OrbStack active contexts and can launch the wrong provider.

Reviews (1): Last reviewed commit: "fix(setup): detect OrbStack vs Docker De..." | Re-trigger Greptile

Comment thread scripts/setup/docker.ts Outdated

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 99bae52. Configure here.

Comment thread scripts/setup/docker.ts
…er Desktop context

macDockerApp() fell through to the OrbStack.app existence check whenever
docker context show returned anything other than "orbstack" — including a
known, explicit context like "desktop-linux". With both apps installed but
Docker Desktop active and stopped, this launched OrbStack while daemonUp()
kept polling Docker Desktop's socket, timing out with OrbStack-flavored
guidance for a Docker Desktop problem.

The path fallback now only runs when the context command gives no answer
at all (null); any resolved context is trusted outright.

Flagged identically by Greptile and Cursor Bugbot on PR simstudioai#6250.
@waleedlatif1

Copy link
Copy Markdown
Collaborator

Thanks @BohdanVilischuk — good catch, and you're right that our own setup script recommends OrbStack and then breaks for anyone who takes the recommendation.

I've carried your commits over to #6253 with authorship preserved, plus a follow-up: detection only fell back to the app bundle when docker context show failed outright, so an OrbStack-only Mac sitting on the default context (OrbStack symlinks /var/run/docker.sock, and anyone who ran docker context use default lands there too) still resolved to Docker Desktop — the same 90s hang this fixes. Also made DOCKER_HOST take precedence, since it overrides the active context.

Closing this in favor of #6253. Credit is yours.

waleedlatif1 pushed a commit that referenced this pull request Aug 4, 2026
…er Desktop context

macDockerApp() fell through to the OrbStack.app existence check whenever
docker context show returned anything other than "orbstack" — including a
known, explicit context like "desktop-linux". With both apps installed but
Docker Desktop active and stopped, this launched OrbStack while daemonUp()
kept polling Docker Desktop's socket, timing out with OrbStack-flavored
guidance for a Docker Desktop problem.

The path fallback now only runs when the context command gives no answer
at all (null); any resolved context is trusted outright.

Flagged identically by Greptile and Cursor Bugbot on PR #6250.
waleedlatif1 added a commit that referenced this pull request Aug 4, 2026
* fix(setup): detect OrbStack vs Docker Desktop before relaunching the daemon

ensureDocker() always ran `open -a Docker` to relaunch a stopped daemon on
macOS, which silently no-ops for OrbStack users (no Docker.app bundle
exists), leading to a misleading "GUI license acceptance" timeout error.
Now it checks the docker CLI's active context first (accurate regardless
of install location) and falls back to checking for OrbStack.app, so the
wizard launches and messages the app that's actually installed.

* fix(setup): don't let an installed OrbStack override an explicit Docker Desktop context

macDockerApp() fell through to the OrbStack.app existence check whenever
docker context show returned anything other than "orbstack" — including a
known, explicit context like "desktop-linux". With both apps installed but
Docker Desktop active and stopped, this launched OrbStack while daemonUp()
kept polling Docker Desktop's socket, timing out with OrbStack-flavored
guidance for a Docker Desktop problem.

The path fallback now only runs when the context command gives no answer
at all (null); any resolved context is trusted outright.

Flagged identically by Greptile and Cursor Bugbot on PR #6250.

* fix(setup): fall back to the installed app when the context isn't OrbStack

Context detection only fell back to the app bundle when `docker context
show` failed outright, so an OrbStack-only Mac sitting on the `default`
context still resolved to Docker Desktop — the same 90s hang this fix
exists to remove. Treat an explicit OrbStack selection as the only
positive context signal and otherwise pick whichever app is installed.

Read `DOCKER_HOST` first: it overrides the active context, so the
context name is not authoritative while it is set.

* fix(setup): require OrbStack to be installed before selecting it

A context or DOCKER_HOST left behind by an OrbStack uninstall selected an
app that can never launch, turning a working Docker Desktop start into a
guaranteed 90s timeout. Gate the OrbStack signal on the bundle being
present and fall through to whichever app is.

Look in ~/Applications as well as /Applications while here — Homebrew
casks honour --appdir, so a user-local install is not unusual and a
hardcoded /Applications check would misread it as "not installed".

* fix(setup): resolve the docker app through LaunchServices, not fixed paths

A Homebrew `--appdir` can put OrbStack anywhere, so enumerating install
directories will always have a tail that reads a present app as missing
and sends setup to the wrong one. Fall back to LaunchServices when the
well-known directories miss: that is the same lookup `open -a` performs,
so availability now agrees with what the launch will actually do.

* fix(setup): settle the docker app with open(1) instead of probing for it

`path to application` can raise a modal "Where is …?" picker when the name
does not resolve, which in a terminal wizard reads as a hang. Drop it: the
launch itself already answers the question, since `open` exits non-zero
when macOS knows no such app, instantly and without UI.

That inverts the design. Rather than predict which app is installed and
then launch it, pick a provider, try to start it, and let the exit code
correct a guess — so the directory probe no longer has to enumerate every
possible install location to be right.

An explicit OrbStack selection is now never redirected to Docker Desktop.
The CLI is addressing OrbStack's socket, so `docker info` keeps failing no
matter how well Docker Desktop starts; the earlier fallback only replaced
a 90s timeout with a differently worded one. Say the context is stale and
how to fix it instead.

* fix(setup): honour `required` when the docker app fails to launch

db.ts and redis.ts call ensureDocker(false) and branch on the boolean to
offer an external Postgres or Redis instead. Throwing past that aborts the
whole wizard when a working non-Docker path was on the table, so every
post-confirm failure now warns and returns false unless Docker is required.

That covers the 90s-timeout throw too, which ignored `required` before this
branch existed — leaving it as the one path that still aborts would make
the flag mean two different things in one function.

Also name DOCKER_CONTEXT in the stale-selection hint. It overrides the
config context, so `docker context use` alone leaves the CLI pointed at
OrbStack and the next run fails identically.

* improvement(setup): don't tell CLI-runtime users to install Docker Desktop

Having the docker CLI but neither GUI app is exactly what a colima or
Rancher Desktop user looks like, and the failure told them to install
Docker Desktop — advice for a problem they don't have. Name the situation
accurately and add starting an existing runtime as an option.

---------

Co-authored-by: Bohdan Vilishchuk <iamtheflex@gmail.com>
@waleedlatif1

Copy link
Copy Markdown
Collaborator

closed as apart of #6253

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