DEV Community

Cover image for How I Replaced 6 GB Docker Desktop with a 65 MB Native Swift PHP 8.5 Stack on Apple Silicon
Stratos
Stratos

Posted on Originally published at stratosapp.dev

How I Replaced 6 GB Docker Desktop with a 65 MB Native Swift PHP 8.5 Stack on Apple Silicon

If you build Laravel, WordPress, or PHP apps on an Apple Silicon MacBook, you've probably felt the exact same frustration: you only have two local projects open, yet Activity Monitor shows Docker Desktop eating 4–8 GB of RAM, Virtualization hammering your CPU, and your MacBook battery dropping 30% in an hour.

For a long time, the tradeoff seemed unavoidable:

  • Docker Desktop / Sail: Great isolation, terrible battery life and slow bind-mount file I/O on large vendor/ directories.
  • Homebrew + Valet: Fast and native, until brew upgrade bumps openssl@4 or icu4c and breaks your PHP extensions or causes dyld: Library not loaded errors across every project.

That frustration is why I built Stratos — a 100% native Swift macOS local development stack that runs coexisting PHP 8.1–8.5 pools, Nginx, MySQL/PostgreSQL/Redis, automatic wildcard .test HTTPS, and developer debugging tools in ~65 MB of idle RAM.


Why Native Swift + Isolated Unix Sockets Beats a Linux VM on macOS

When Docker Desktop serves a local Laravel request on macOS, every file read in vendor/ and storage/ crosses the macOS ↔ Linux VM filesystem bridge (VirtioFS). On a real Laravel app with 400+ autoloaded files per request, that virtualization overhead adds up fast.

On a native stack:

  1. Direct APFS I/O: PHP-FPM reads directly from macOS APFS with zero VM translation layer — sub-20ms TTFB on local Laravel routes.
  2. Coexisting PHP 8.1, 8.2, 8.3, 8.4, and 8.5 FPM Pools: Instead of globally switching php every time you jump between a legacy client project (PHP 8.1) and a new Laravel 12 app (PHP 8.5), each PHP version runs its own isolated Unix socket (~/Library/Application Support/Stratos/fpm/php8.X-fpm.sock) and Nginx routes each .test site to its pinned version simultaneously.
  3. Zero Port-53 Hijacking: Local .test DNS runs on an isolated dnsmasq port (53535) wired via /etc/resolver/test — so it never conflicts with Pi-hole, NextDNS, corporate VPNs, or Docker's own DNS.
  4. Automatic Wildcard .test HTTPS: A local Root CA is generated and trusted in your macOS Keychain once, issuing SAN certificates automatically (including for Git worktree branch subdomains like feature-auth.myapp.test).

Measured Idle Footprint (Apple Silicon M-Series)

Metric Docker Desktop + Sail (2 Laravel Sites) Native Swift Stack (Stratos)
Idle RAM 4.2 – 6.8 GB ~65 MB
Cold Boot Time 18 – 35 seconds < 1 second
Multi-PHP Side-by-Side Separate container per version Isolated Unix sockets (8.1–8.5)
File Sync Overhead VirtioFS bridge 0% (Native APFS)
Battery Drain High (VM polling) ~0.1% idle CPU

Solving the Real Day-to-Day Local Dev Friction

Beyond raw speed, native local development only sticks if you don't need 4 other apps open alongside it:

  • Git Worktree Branch Subdomains: Create or link a Git worktree and immediately access it at feature-branch.myapp.test with isolated SQLite and queues — test two branches side-by-side without stashing.
  • Built-in Universal Database Hub: Browse SQLite, MySQL, and PostgreSQL tables natively + generate interactive ER Schema Diagrams without switching to a separate $89 GUI.
  • Visual PHP & Laravel Tinker REPL + 1-Click Xdebug 3: Run Eloquent queries in a visual sandbox and toggle Xdebug on port 9003 for PhpStorm/Cursor/VS Code with zero php.ini editing.
  • Built-in Local AI MCP Bridge (v1.7.2): Connect Cursor, Claude Code, Claude Desktop, or Windsurf directly to your local site metadata, live DB schemas, and Laravel exception logs over localhost loopback — no more copy-pasting stack traces.

Try It Free (Zero Docker, Zero Subscription Lock-In)

Stratos Core is free forever (Nginx, multi-PHP 8.1–8.5, automatic .test HTTPS, CLI companion, MailCatcher, SQLite/MySQL browsing, and Free read-only MCP schema context).

If you want the full Pro suite (Visual Tinker, ER Diagrams, unlimited Cloudflare Tunnels, Request Inspector & cURL replay, Site Snapshots, and full MCP execution), it's $39/year or a $89 one-time Founder Lifetime license (currently 20% off with code BFCM20 through Nov 30, 2026 — $71.20 once for 3 Macs).

Happy to answer any questions about Swift process orchestration, Homebrew bottle dependency resolution (openssl@4), or Unix socket FPM pooling in the comments!

Top comments (0)