Repository navigation
Rewrite docker's Darwin deploy path against the API that exists - #81
Merged
Merged
Conversation
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.
A clean-slate rewrite of the
dockerpackage, starting with Darwin. Planned inNobleFactor/devlore-cli
docs/plans/docker.devlore-package.md.Why a rewrite and not a repair
Every phase script in the previous package called an API that no longer exists:
plan.package.install("docker-ce", "docker-ce-cli")pkg; it takes a list, not varargsplan.verify(name, check=…, optional=True)Verifymethod on any provider — all fourverify.starfiles were entirely these callsplan.file.write(path=…, content=…)plan.file.write_text(destination_path=…, content=…, mode=…)plan.user.add_to_group(user, "docker")userproviderplan.download(url, dest)appnet.download(url)returns bytes; no dest formplan.notify(…)Upgrade/install.starUpgradePhaseOrderis{prepare, upgrade, migrate, verify}—installis not an upgrade phaseNothing reads
.starcontents in CI, so this passed continuously. Chartered asNobleFactor/devlore-cli#721.
Darwin is Colima, for licensing
The previous Darwin path installed Docker Desktop from a DMG and was blocked on primitives that do
not exist. The bash that actually deploys uses Colima, and the reason is licensing: Docker
Desktop requires a paid subscription above 250 employees or $10M revenue, and OrbStack has a paid
commercial tier. A Darwin package built on Desktop hands every customer a licence obligation that
scales with their headcount.
So this package ensures a runtime exists. It never displaces an installed Desktop or OrbStack —
the goal is to avoid putting a licensed product on a machine, not to prefer Colima on its merits.
Decommission is asymmetric for the same reason, and that falls out of the receipt boundary rather
than needing a feature flag.
What is added
lifecycle.yaml— rewritten. Darwin only;purge-datathe sole feature; licensing rationale innotes.README.md— rewritten. Tribal knowledge with its reasons, including why binary presence is thewrong runtime check and why the Colima flags matter.
Darwin/Deploy/install.star— the runtime guard, built as a decision tree because a phase script'sruntime is hermetic and cannot interrogate the host at plan time.
Darwin/Deploy/provision.star—colima startwith--vm-type vz --mount-type virtiofs --vz-rosetta. The source bash passes only--cpu 2 --memory 4, leaving VM and mount type atdefaults; those flags are the difference people usually mistake for Colima being slow.
Darwin/Deploy/verify.star—docker infothendocker run --rm hello-world.No
Darwin/Deploy/prepare.star: Darwin has no prepare work, and an empty phase is worse than anabsent one.
Every branch is an invocation and there are no lambdas anywhere, so these graphs write their
receipts — see NobleFactor/devlore-cli#720.
What is removed — 37 files
Linux.Debian/,Linux.Fedora/,Windows/,Darwin/Decommission/,Darwin/Upgrade/, andDarwin/Deploy/prepare.star. All of it targets the dead API above.Linux.Debianreturns rewritten — it is where the fuller mechanism lives: apt receipts, a realsystemd service through
plan.service.*, seven conflicting packages removed under adpkg-queryguard, and hardware-gated verification that treats an ODROID missing its cgroup v1 boot argument as
degraded rather than failed.
Linux.Fedorais not coming back until the platform router wires a dnf leaf. Driving it throughplan.shell.execwould work but forfeits receipts, which would defeat the decommission proof.Windowsis viable later —wingetis wired — but no source script covers it.Known limitation, being fixed next
install.stardetects existing runtimes by path (/Applications/OrbStack.app,/Applications/Docker.app). The executing graph is fsroot-confined to its own directory, so thoseabsolute paths are not reachable and the guard will not work as written. The replacement is
docker infoanswering, which is the semantically correct predicate anyway — binary presence issatisfied by a dangling shim, and a dormant
Docker.appcan sit beside a live OrbStack servingnothing.