Repository navigation
feat: experimental Apple Container support via socktainer, fixes #7372 - #8656
Conversation
f7cb75c to
2ebe1f8
Compare
Status update: socktainer upstream engagementThe blocker that mattered most for this PR —
Six more socktainer fixes (DNS wrong-network address, version reporting, Also open, independent of any socktainer fix landing: #8657, #8658, #8659 — DDEV-side |
Next steps to try to verify against the socktainer fixes ahead of mergeRemaining steps
Verifying locally, ahead of any of this merging upstreamEvery fix above is DCO-signed-off and individually tested in the cd ~/workspace/socktainer
git checkout -b tmp/rollout-verify main
git merge --no-edit \
fix/exec-hijack-close fix/dns-wrong-network-address fix/version-engine-version \
fix/archive-404-prestart fix/healthcheck-timing fix/filter-name-ignored \
fix/cp-directory-hang
make releaseSwap the built binary in for the Homebrew-managed daemon (it reads the real brew services stop socktainer
~/workspace/socktainer/.build/release/socktainer &Then re-run the cold-start recipe from this branch's brew services start socktainerFindings from that run will fold back into |
socktainer status: DDEV now works end to end on Apple Container
Practical result as of today, with the fixes below applied,
Still required by hand, and none of it addressed by the queued branches:
So: a working proof of concept that needs real design work before it's a supported provider, not a finished feature. Apple Container's own limits are in the separate comment. Three new socktainer bugs found, root-caused and fixedThese are local, uncommitted work in a 1. Exec upgrade gating — the actual cause of
|
| socktainer | docker exec -i keepalive sh -c 'sleep 30; echo done-30' |
|---|---|
| 1.2.1 Homebrew bottle | done-30, 30.2s, exit 0 |
| local build with #347 | no output, 10.1s, exit 255 |
A timeout is the wrong mechanism: a stalled XPC wait() cannot be told apart from a process that is still running. Output-pipe EOF can be — Apple Container closes the container-side write ends when the exec process exits, so EOF is the exit signal and it arrives whether or not XPC acknowledges anything. Reworked locally to close on EOF and start the 10s bound there, only to collect the numeric exit code. The chunked-stream path in the same file already worked this way.
Both #347 and #346 are now closed. What should be filed instead is the gating fix above, plus close-on-EOF as a separate, honestly-scoped robustness change.
fix/filter-name-ignored — rfay/socktainer#9
Fixed the matching semantics (substring, like real Docker) but not the parsing, so the filter never reached the corrected code. Incomplete without new fix 3 above.
fix/version-engine-version — rfay/socktainer#13
Works as designed but doesn't achieve the goal. DDEV then warns installed Docker version 0.0.0-dev is not supported, please update to version 25.0 or newer, and a tagged 1.2.x release would fail the same >= 25.0 check. The real fix is a socktainer-aware version check on the DDEV side.
Untouched and still believed good
fix/dns-wrong-network-address (#7), fix/archive-404-prestart (#10), fix/cp-directory-hang (#11). fix/healthcheck-timing (#12) was in the build but is untested — the project kept its shortened healthcheck overrides all session, so whether DDEV's default interval 1s / timeout 70s / start_period 120s now works was never exercised. rfay/socktainer#14 stays closed as not reproducible.
Corrected diagnoses
Worth recording, because two of these sent earlier work down the wrong path:
- The exec hang is not a teardown bug. rfay/socktainer#8 and closed socktainer/socktainer#346 both state that output arrives byte-for-byte and only the post-exit close fails. In fact zero bytes arrive and no HTTP response is ever sent. The hijacked path closed correctly in every case I could produce on 1.2.1.
docker execwithout-itdoes hijack. Runningddev startshould create a ddev managed Drupal settings.php #346 says it "uses the codepath that doesn't hijack"; instrumented logging shows it sending the same upgrade headers withattachStdin=false. That assumption is what pointed the diagnosis at the wrong code.- The 502 was EDNS0 malformation, not the multi-homed-address bug. Blocker 3's second half was a red herring for this symptom.
- A surviving buildkit node does not need recreating after a socktainer restart.
ddev debug rebuildbuilt both images in 9s against a node that predated the restart. Recreation is only needed once the node itself has exited.
New socktainer behaviors, no issue filed yet
- Compose recreate-by-rename collides with hostname uniqueness. Compose recreates a container by renaming the old one aside (
POST /containers/create?name=<hash>_ddev-router) and creating the replacement under the original name. Renaming does not move the container's hostname, and Apple Container enforces hostname uniqueness globally, so the create is rejected:Failed to create container: exists: "hostname(s) already exist: ["ddev-router"]". This makesddev restartexit 1 andddev debug rebuildfail at the router; the router left running is a stale survivor. Same shape as the shared-volume blocker — any DDEV path going through compose's recreate rather than removing containers first will hit it. - Health status resets to
startingfor every container after a daemon restart and stays there while the containers keep working normally.ddev restartclears it (all three healthy in ~35s). brew services start socktaineris unusable with the standard docker context. The service runs withHOME=/opt/homebrew/var/run/socktainer, so it binds/opt/homebrew/var/run/socktainer/.socktainer/container.sockwhile thesocktainerdocker context points at~/.socktainer/container.sock. The daemon has to be run by hand.
Open unknowns
- Why the docker CLI escapes the gating hang. curl and DDEV's Go client both hang on what appears to be an identical request; the CLI succeeds. Most likely client-side (checking 101 vs 200 before taking over the socket), but curl's result doesn't fit that cleanly, so there may be a second bug where the chunked reply isn't terminated on that path. This needs settling before the gating bug is filed upstream, or the description risks being wrong in a subtler way than Running
ddev startshould create a ddev managed Drupal settings.php #346 was. - Whether the XPC stall Revert "Use named volumes for MySQL volume" #347 guarded against exists at all. Never reproduced — though released
maindoes gate the channel close on an unboundedprocess.wait(), so the concern is real in the code even if unobserved. - The socktainer unit suite cannot be run in this environment. It compiles, but
swift testcan't loadTesting.framework— only the_Testing_*overlays ship with Command Line Tools; running the suite needs full Xcode. So all verification here is behavioral, not unit-tested. ddev sshinteractively — reported broken, not reproduced. A pty-driven session with piped input worked; a live session holding stdin open is a different case and remains unverified.
DDEV-side PRs from this investigation
Four are open as drafts. Each is based on main, not on this branch, and each stands alone as a provider-independent fix:
- ddev/ddev#8657 (
20260802_rfay_bound_host_ports_fallback) — fall back toNetworkSettings.PortsinGetBoundHostPorts - ddev/ddev#8658 (
20260802_rfay_existing_db_type_no_volume_conflict) — read the db version via exec instead of a second volume mount - ddev/ddev#8659 (
20260802_rfay_global_cache_chown_non_fatal) — don't let a failing global-cache chown kill the web container - ddev/ddev#8660 (
20260802_rfay_dockerutil_exec_no_hijack) — stop hijacking the exec stream inExec()
None of the four was in the binary used for the socktainer testing above — that binary was built from this branch (#8656) alone. Worth knowing when reading the results: #8658's absence is why every ddev start above required removing the web and db containers first, and #8659's absence was worked around inside the test project with a sed hack in .ddev/web-build/Dockerfile. #8657 and #8659 have therefore never been exercised against socktainer at all.
#8660 alone unblocks the hang, against completely stock socktainer — measured
DDEV's unconditional hijack request is exactly what triggers socktainer's silent no-response, so #8660 removes the hang with nothing needed from upstream. Verified directly: #8660 merged into this branch, run against the released 1.2.1 Homebrew bottle with none of the socktainer fixes applied:
Successfully started appletest # exit 0, 1m55s, images built, all three containers healthy
ddev exec php -v works in that configuration too. What does not work there: the site returns 502, because the EDNS0 malformation is still present and traefik cannot resolve ddev-appletest-web — so the DNS fix is what takes it from 502 to 200. Host access remains blocked by port publishing either way.
So the useful split is: #8660 fixes the hang today with no upstream dependency, the DNS/EDNS0 fix is needed for the last routing hop, and port publishing blocks host reachability regardless of both.
Apple Container frictions — and the port blocker turned out to be an install-method problemCompanion to the socktainer comment above, which covers socktainer's own bugs. This one is about limits that belong to Apple Container / macOS. Resolved while writing this: the port blocker was not an Apple Container limitation at all. It was macOS Local Network (TCC) authorization, which is scoped to a binary path — and the authorized path was the signed installer's, not Homebrew's. Installing That leaves exactly one genuine architectural friction on this platform: shared writable volumes. Environment for everything below: macOS 27.0 beta (26A5388g), 1. Published ports reset — SOLVED: Local Network authorization is scoped to a binary pathBottom line: install Apple Container from the signed installer, not Homebrew, or published ports silently fail. Same version, same OS, same config — only the install path differs, and that decides whether macOS grants Local Network access. The proof, run end to end today:
Then, with nothing else changed but the install: That is DDEV reachable at its advertised URLs from the host — no container IP, no hand-set Why the install path matters
It is path-keyed, not app-keyed — Google Chrome has a dozen records, one per Unauthorized, the helper binds the host listener fine, accepts the client connection, and then fails its backend connect:
No prompt ever appears for the Homebrew copy, and there's a plausible reason: the helper runs as a launchd-registered service, and TCC prompts generally cannot surface from a daemon with no UI session. So a Homebrew install has no path to authorization through normal use — it fails silently and permanently, while Consequences
Original diagnosis, kept for the recordPublished ports reset — an OS-level problem, not an Apple Container limitThis is the current blocker, and it is not DDEV-specific. Two commands, stock nginx, no DDEV and no compose involved: docker run -d --name porttest -p 127.0.0.1:38080:80 nginx:alpine
curl http://127.0.0.1:38080/ # curl: (56) Recv failure: Connection reset by peer
curl http://192.168.64.102/ # 200 OK — direct to the container IP worksThe port genuinely listens (
Candidate A — macOS 27 beta regression. apple/container#2029 (open) reports the identical Candidate B — unapproved macOS Local Network prompt (TCC). apple/container#2067 (closed as completed) has the same EHOSTUNREACH-on-backend-connect signature, and its resolution was:
That report was on macOS 26.6, not 27, which is the reason to weigh it below A. But (apple/container#1702, closed, is the same symptom pair on 1.0.0 — prior art for both.) Evidence that shifts this toward B: the authorized path isn't the one running. That is the signed-installer path. The helper actually running is the Homebrew one: and the plist contains zero And the store is path-keyed, not app-keyed. Google Chrome has one record per System Settings → Privacy & Security → Local Network does list There is also a plausible reason the Homebrew copy never produced a prompt: it runs as a launchd-registered service, and TCC prompts generally cannot surface from a daemon with no UI session. That is precisely #2067's "silent pre-approval window", and it would mean a Homebrew-installed Apple Container may never be able to get Local Network authorization on this OS, while the signed installer can. If that holds it's worth knowing well beyond DDEV. Still unproven: that this plist is the authoritative store, and that absence of a record means denied rather than never-asked. Candidate A also stays alive because #2029's reporter was on the signed installer (1.1.0) and still failed on macOS 27 beta. The decisive test is therefore to run the signed-installer build at the already-authorized (That test was run: 200. Candidate B confirmed, candidate A ruled out.) Either way the conclusion for this PR is the same: port publishing is broken below Apple Container, not by it, and no DDEV or socktainer change fixes it. What that promotes is the "Apple Container mode" idea already sketched in the branch's 2. Ports below 1024 cannot be published — a real platform constraintSeparate from the above, and not fixable by approving anything. The forwarder runs unprivileged, so DDEV's default configuration is rejected outright: Not a new class of problem for DDEV — rootless Podman is already a supported provider with the same restriction, and 3. A writable named volume can be attached by exactly one container — the one genuine architectural frictionEach named volume is an ext4 disk image, and Virtualization.framework cannot attach one writable block device to two VMs. Re-verified today against the current build:
Writing from inside a
The nuance that matters: the exclusivity belongs to block devices, not to Apple Container storage generally. Virtiofs bind mounts are shareable read-write — which is exactly why the global-cache workaround works. So this is routable rather than terminal: backing This is the only friction on this list that needs DDEV architecture thought rather than configuration; the design options are enumerated in the branch's 4. No DNS on the built-in
|
137ae3e to
28646b8
Compare
1ff4a2d to
739d33e
Compare
e3c3202 to
72074ff
Compare
40c75ed to
5e41ea5
Compare
5e41ea5 to
f431f2b
Compare
|
See https://compose.andon.dev/ - compose for apple/container |
2ac297b to
f2f0729
Compare
|
hello @rfay let me know if there is something missing from socktainer side |
|
Thanks @benoitf ! There are several things, thanks so much for your interest! The HANDOFF.md shows the current state, and there are issues in rfay/socktainer for the things. I'm reluctant to post AI-generated issues/PRs to socktainer/socktainer without knowing what I'm doing. |
|
@rfay do not hesitate to post issues, at least it's a good place to discuss them I'll look at the md file |
f2f0729 to
f270d64
Compare
6b3c110 to
65c1279
Compare
b11f8d1 to
e797b60
Compare
e797b60 to
8db48c5
Compare
|
@rfay looks like such a huge amount of work... 👏 . I tested and ran into some issues. Claude helped me work it out. From my agent... Tested the manual checklist from this PR's description on macOS 27.2 (26B123), Apple Container 1.7.1, Apple silicon. Full checklist passes, but only after working around a DNS bug in released socktainer 1.6.1:
Blocker found: socktainer 1.6.1 (the version this PR's docs tell you to This reproduced identically after a full clean reinstall (wiped Workaround: build socktainer from HEAD and run it with the new With that, Worth calling out in the docs tab (or raising |
|
Thanks! I don't see that problem, and our automated tests are also succeeding with this configuration, but there are a number of PRs ahead of 1.6.1 that we're waiting for a release on, in addition to explicit support for container 1.7.1. I guess if you're dependent on you must have a nonstandard DNS/network situation? Congrats on finding your way through it! |
|
Strange...
Sigh. Thanks robots. I tried a real project too, and it works!!! |
|
Awesome work, thanks for checking that out again. I'm pretty thrilled that you found the |
stasadev
left a comment
There was a problem hiding this comment.
Looks good to me. Everything is gated on IsAppleContainer(), and other providers behave the same. A few small things, none blocking.
ddev utility port-diagnoseprintsapple container, while the other providers there are display names likeRancher Desktop. MaybeApple Container?ddev-environmentnow reportsapple-container, the same asdocker-platform, and both go to Amplitude's identify event. That also makespkg/environmentimportdockerutil. Do we need both?docker-platformalready tells Apple Container apart, andddev-environmentcould staydarwin.- In
GetHostDockerInternal(), theIsAppleContainer()case could setextraHost = "host-gateway"itself, without the secondelse if IsAppleContainer()below.
Claude Code compared this head (8db48c5) with its base (8c33daa) on Linux with Docker 29. ddev utility compose-config came out the same apart from the version string and random host ports, with ssh_agent_upstream both unset and set to host. ddev-ssh-agent still runs, and ssh-add -l in web lists the host key. The new published-port-check.sh passes there too. Nothing was run on Apple Container itself. That side relies on macos-socktainer build 42, which passed on this head, and on froboy's run.
🤖 Reviewed with assistance from Claude Code
…#7372 ## Short Summary (TL;DR) DDEV detects Apple Container behind [socktainer](https://github.com/socktainer/socktainer) and adapts to it, so projects start and run there. Support is marked experimental, and nothing changes on other providers. ## The Issue - Fixes ddev#7372 Apple Container runs each container in its own VM. A named volume takes either one read-write attachment or any number of read-only ones. A Unix socket in one container can't be reached from another. Ports below 1024 can't be published. socktainer, the Docker-compatible API in front of it, still has gaps. Most of the volume sharing DDEV used to depend on was removed upstream for ddev#8895 (ddev#8945, ddev#9024, ddev#8956, ddev#8944, ddev#9041, ddev#9042, ddev#9045). ddev#9040, ddev#9046, ddev#9061, ddev#9108, ddev#9115 and ddev#9121 also came out of this work. What's left is here. ## How This PR Solves The Issue DDEV detects the provider through socktainer's `docker version` output (`IsAppleContainer()`). Every change below applies only on that provider. - `ddev version`, `ddev utility dockercheck`, `ddev utility port-diagnose` and instrumentation report the provider as `apple-container`. - `ddev start` and `ddev utility dockercheck` warn when socktainer is older than 1.6.1. Builds from source report no release version, so DDEV doesn't compare them. - `ddev-ssh-agent` is always omitted, because web can't attach a volume another VM holds. With `ssh_agent_upstream` set, web bind-mounts that host socket directly, and Apple Container relays it into the VM. `host` uses `SSH_AUTH_SOCK`. `ddev auth ssh` explains this instead of adding keys to an agent web can't reach. - `CopyIntoContainer` extracts with `tar` inside the container. socktainer 1.6.1 ignores a gzipped archive ([socktainer#484](socktainer/socktainer#484)) and drops each file's owner and mtime ([socktainer#514](socktainer/socktainer#514)). Both are fixed on socktainer `main` but not released. - The mkcert CA archive leaves out its directory entry, which a never-started container refuses ([socktainer#502](socktainer/socktainer#502)). - Project images build one service at a time. Concurrent image loads can leave a tag on its old image ([socktainer#518](socktainer/socktainer#518)), and Compose's bake build loads them all at once. Compose's concurrency limit doesn't reach the bake path, so DDEV calls `Build` once per service. - Image pulls and `BuildPlatformToPull` use `linux/<arch>`, because socktainer's `/version` reports `Os: macOS` ([socktainer#517](socktainer/socktainer#517)). - `host.docker.internal` is `host-gateway`, which socktainer resolves to the network gateway where the Mac answers. - `FindContainersByVolume` matches `Mounts` itself, because socktainer ignores the `volume=` filter. - Add-on installs get the same virtiofs propagation delay as Lima and Colima. - Docs: an experimental Apple Container tab on the macOS Docker installation page, with setup, the Local Network prompt, SSH keys, limitations and a fix for a hanging `container system start`. Mutagen works and is the default, as on any macOS provider. Known limitations, each documented or named by a test skip: - **Ports below 1024** can't be published. The router needs `ddev config global --router-http-port=8080 --router-https-port=8443`. The global setting matters: with 80/443 there, the router fails to bind even when the project sets 8080/8443. - **Single-writer volumes:** add-on services that share a named volume with a running container fail to start. Apple closed [apple/container#1133](apple/container#1133) as working as designed. - **Open socktainer issues:** [ddev#518](socktainer/socktainer#518), [ddev#519](socktainer/socktainer#519), [ddev#520](socktainer/socktainer#520), [ddev#517](socktainer/socktainer#517), [ddev#514](socktainer/socktainer#514), [ddev#510](socktainer/socktainer#510), [ddev#504](socktainer/socktainer#504), [ddev#499](socktainer/socktainer#499), [ddev#498](socktainer/socktainer#498), [ddev#497](socktainer/socktainer#497). - **Unreleased socktainer fixes:** `main` has fixes for ddev#505, ddev#514, ddev#484 and ddev#498, the last still in PR [ddev#528](socktainer/socktainer#528). After the next release, a follow-up can raise `SocktainerMinVersion` and remove the matching skips and the `tar` workaround. - socktainer 1.6.1 warns that it was built for Apple Container 1.6.1 when run with 1.7.1. The CI testbots run that pair, and it passes. ## Manual Testing Instructions This needs macOS 26 on Apple silicon. The setup is in the new docs tab: https://ddev--8656.org.readthedocs.build/en/8656/users/install/docker-installation/ ```bash brew install socktainer docker docker-buildx container system start socktainer & docker context use socktainer ddev utility download-ddev --pr 8656 export PATH="$HOME/tmp/ddev-download-ddev/pr-8656:$PATH" ddev config global --router-http-port=8080 --router-https-port=8443 --ssh-agent-upstream=host mkdir -p ~/tmp/appletest && cd ~/tmp/appletest echo '<?php echo gethostname();' > index.php ddev config --project-type=php --docroot=. ddev start -y # Expect: macOS asks to allow container-runtime-linux on the local network the first time; click Allow curl -s http://appletest.ddev.site:8080/ # Expect: appletest-web ddev mutagen st -l | grep Status # Expect: Status: Watching for changes ddev exec ssh-add -l # Expect: the keys that `ssh-add -l` lists on the host ddev auth ssh # Expect: an explanation that web uses the host's agent directly ddev utility dockercheck # Expect: socktainer version: 1.6.1 ``` On another provider, run `ddev debug compose-config` in a project. Confirm that web still mounts `ddev-ssh-agent_socket_dir` and that `host.docker.internal` is unchanged. ## Automated Testing Overview The Buildkite pipeline [macos-socktainer](https://buildkite.com/ddev/macos-socktainer) runs the suite with `DOCKER_TYPE=socktainer` and router ports 8080/8443. It runs on testbots with Apple Container 1.7.1 and socktainer 1.6.1. Build 40 passed on this branch before it was squashed. - `TestAppleContainerSSHAgent` covers the host-agent mount. The `ddev-ssh-agent` tests skip there. - Tests that hit a known socktainer or Apple Container gap skip on `IsAppleContainer()`, and each skip names its cause. - `SkipUnlessDefaultEnvironment` still skips its tests there through its Mutagen check. ## Release/Deployment Notes Apple Container support is experimental. The `macos-socktainer` pipeline builds only this branch, so its branch filter needs widening after merge. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dev#7372 `sanetestbot.sh` now runs `published-port-check.sh`, which publishes a port from a container and requests it from the host. When host port forwarding is broken, every HTTP test in the job fails with connection resets. The check fails the job early with one clear message instead. On socktainer it also looks for a pending macOS Local Network prompt for `container-runtime-linux` and names it. `test.sh` uploads `~/tmp/socktainer.log` as a build artifact on socktainer runs, because it records DNS registrations and forwarder restarts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- `ddev utility port-diagnose` names the provider "Apple Container", matching the other display names. - Drop the `apple-container` value of `ddev-environment`; it stays `darwin`, since `docker-platform` already reports Apple Container. `pkg/environment` no longer imports `dockerutil`. - Set `host-gateway` inside the `IsAppleContainer()` case of `GetHostDockerInternal()` instead of in a second branch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
8db48c5 to
16eeab5
Compare
|
Did those, thanks! |
stasadev
left a comment
There was a problem hiding this comment.
Looks good to me.
I ran the manual checklist from the description on a MacBook Air with macOS 27.2.1, Apple Container 1.7.1 and socktainer 1.6.1, using the PR build v1.25.6-23-g16eeab51e. HTTP on 8080, HTTPS on 8443, Mutagen, ddev exec ssh-add -l with the host agent, ddev auth ssh and ddev utility dockercheck all worked, and web reached both the internet and host.docker.internal. Claude Code ran the same steps over SSH first and traced the failures below.
Short Summary (TL;DR)
DDEV detects Apple Container behind socktainer and adapts to it, so projects start and run there. Support is marked experimental, and nothing changes on other providers.
The Issue
Apple Container runs each container in its own VM. A named volume takes either one read-write attachment or any number of read-only ones. A Unix socket in one container can't be reached from another. Ports below 1024 can't be published. socktainer, the Docker-compatible API in front of it, still has gaps. Most of the volume sharing DDEV used to depend on was removed upstream for #8895 (#8945, #9024, #8956, #8944, #9041, #9042, #9045). #9040, #9046, #9061, #9108, #9115 and #9121 also came out of this work; #9108 already pulls
linux/<arch>images and matches volume holders byMountson socktainer. What's left is here.How This PR Solves The Issue
DDEV detects the provider through socktainer's
docker versionoutput (IsAppleContainer()). Every change below applies only on that provider.ddev version,ddev utility dockercheck,ddev utility port-diagnoseand instrumentation report the provider asapple-container.ddev startandddev utility dockercheckwarn when socktainer is older than 1.6.1. Builds from source report no release version, so DDEV doesn't compare them.ddev-ssh-agentis always omitted, because web can't attach a volume another VM holds. Withssh_agent_upstreamset, web bind-mounts that host socket directly, and Apple Container relays it into the VM.hostusesSSH_AUTH_SOCK.ddev auth sshexplains this instead of adding keys to an agent web can't reach.CopyIntoContainerextracts withtarinside the container. socktainer 1.6.1 ignores a gzipped archive (socktainer#484) and drops each file's owner and mtime (socktainer#514). Both are fixed on socktainermainbut not released.Buildonce per service.host.docker.internalishost-gateway, which socktainer resolves to the network gateway where the Mac answers.container system start.Mutagen works and is the default, as on any macOS provider.
Known limitations, each documented or named by a test skip:
ddev config global --router-http-port=8080 --router-https-port=8443. The global setting matters: with 80/443 there, the router fails to bind even when the project sets 8080/8443.mainhas fixes for ddev ssh (maybe) should land in root /var/www/html not docroot (implement working_directory config) #505, Validate project name in "ddev config" #514, Reorganize start/stop/rm commands #484 and fix installer script colors, remove tput dep, fixes #490 #498, the last still in PR #528. After the next release, a follow-up can raiseSocktainerMinVersionand remove the matching skips and thetarworkaround.Manual Testing Instructions
This needs macOS 26 on Apple silicon. The setup is in the new docs tab: https://ddev--8656.org.readthedocs.build/en/8656/users/install/docker-installation/
The steps below start Apple Container and socktainer by hand, as the docs do. #9185 proposes running both with
brew servicesinstead, and lists what to check first. To test that way, follow its steps in place ofcontainer system startandsocktainer &.On another provider, run
ddev debug compose-configin a project. Confirm that web still mountsddev-ssh-agent_socket_dirand thathost.docker.internalis unchanged.Automated Testing Overview
The Buildkite pipeline macos-socktainer runs the suite with
DOCKER_TYPE=socktainerand router ports 8080/8443. It runs on testbots with Apple Container 1.7.1 and socktainer 1.6.1. Build 40 passed on this branch before it was squashed.TestAppleContainerSSHAgentcovers the host-agent mount. Theddev-ssh-agenttests skip there.IsAppleContainer(), and each skip names its cause.SkipUnlessDefaultEnvironmentstill skips its tests there through its Mutagen check.Release/Deployment Notes
Apple Container support is experimental. The
macos-socktainerpipeline builds only this branch, so its branch filter needs widening after merge. Follow-up: #9185, setup withbrew services.🤖 Generated with Claude Code