📋 Overview
At WWDC26, Apple introduces Container Machine — a new feature built on top of the open-source Containerization framework that provides a highly integrated, persistent Linux environment on the Mac. Container Machine combines the speed and lightweight nature of containers with the persistence of virtual machines, while feeling like a native extension of macOS. Key integrations include automatic user mapping, shared filesystem support, and seamless terminal access. Michael demonstrates the full workflow: creating machines from OCI images, running commands, and building a Vapor web server edited in Xcode and running in Linux — all with shared files updating in real time.
1 What Is Container Machine?
Container Machine is a new feature built on top of Apple's Containerization framework. It provides a highly integrated Linux environment that works seamlessly on your Mac. The core concept is a hybrid:
- Fast and lightweight like a container — sub-second start times, minimal overhead
- Persistent like a virtual machine — state survives across sessions, you can revisit and continue where you left off
- Feels native to macOS — with host integrations that make switching between macOS and Linux seamless
2 Containerization Framework Recap
Containerization was open-sourced at WWDC25. It is a Swift framework for running Linux containers on macOS with a focus on security, privacy, and performance:
- APIs for storage, networking, execution, and a Linux init system
- VM-based isolation — each container runs inside its own lightweight virtual machine
- Sub-second start times — the lightweight VMs are designed for speed
- Container tool — an open-source CLI for image creation, distribution, and lifecycle management
3 Design Principles
Four principles guided the design of Container Machine:
1. Fast & Lightweight
Environments should integrate into existing workflows without friction. Switching between macOS and Linux should be easy and instant.
2. Simple to Create & Manage
Users should be able to quickly create new environments — one per project if needed — without worrying about conflicting dependencies or toolchains.
3. Persistent
Different tools and dependencies are required at different stages of development. A persistent environment lets you add tools and revisit over time, unlike ephemeral containers that start fresh every time.
4. Native macOS Integration
Developing for multiple platforms shouldn't involve a large context switch. There shouldn't be a need to learn new tools when targeting a different environment.
4 Architecture & Key Features
Container Machine builds on top of Containerization with these capabilities:
- Lightweight VM isolation — each Container Machine runs inside its own lightweight virtual machine
- Standard OCI images — uses the same image format as containers; any image built with the container tool can be a starting point
- First-class CLI —
container machineis a first-class feature of the container tool with familiar UX (create, run, stop, list) - Stateful persistence — all modifications persist; start and stop projects as needed, continue where you left off
- Automatic user mapping — your macOS username is mirrored inside the Container Machine
- Shared filesystem — your Mac's filesystem is shared with the Container Machine; edits in Xcode are immediately visible inside Linux
- Consistent working directory — the Container Machine mirrors your current working directory from macOS
- Isolated networking — each Container Machine has its own IP address and isolated network
5 Demo — Creating & Running Commands
Michael demonstrates the basic Container Machine workflow:
Create
Creates a new Container Machine from the Alpine OCI image and sets it as the default machine (so you don't need to specify the name for every command).
Run Commands
Interactive Shell
Running without additional arguments starts an interactive shell inside the Container Machine.
6 Seamless Host Integration
The key differentiator is how seamlessly Container Machine integrates with macOS:
Automatic User Mapping
whoamion macOS returns Michaelwhoamiinside the Container Machine returns Michael — the same user
Consistent Working Directory
pwdon macOS shows your home directorypwdinside the Container Machine shows the same path
Shared Filesystem
Files edited on macOS (e.g., in Xcode) are immediately available inside the Container Machine — no copying, no syncing, no mounting commands.
7 Demo — Cross-Platform Vapor Web Server Workflow
Michael demonstrates a real-world cross-platform development workflow with a Vapor-based Swift web server:
The Workflow
- Edit in Xcode on macOS — the project (
Package.swift, source code, public assets) is edited natively on the Mac - Use macOS tools — e.g., Icon Composer to create and edit icons for the web app
- Build & run in Linux — the Container Machine has the Swift toolchain installed; compile and run the Vapor server inside the Linux environment
- Test from macOS — open Safari and access the web server via the Container Machine's IP address + port
Key Commands
Networking
Each Container Machine has an isolated network with its own IP address. To access the Vapor server from Safari on macOS, the server's hostname is set to the Container Machine's IP (visible via container machine list). Safari then accesses http://<container-ip>:8080.
Live File Updates
Michael edits an icon in Icon Composer on macOS, exports it to the project's Public directory, and refreshes Safari — the updated icon appears immediately without any file copying into the Container Machine. The shared filesystem makes this completely transparent.
🎯 Key Takeaways
🔑 Key Takeaways
- Container Machine = container speed + VM persistence — fast, lightweight Linux environments with sub-second start times that persist across sessions
- Built on Containerization — Apple's open-source Swift framework (since WWDC25) that provides VM-based isolation for Linux containers on macOS
- Standard OCI images — uses the same image format as containers; Alpine, Ubuntu, or custom images all work as starting points
- Automatic user mapping — your macOS username and working directory are mirrored inside the Container Machine automatically
- Shared filesystem — files edited on macOS are immediately available inside the Container Machine with no copying or syncing required
- Isolated networking — each Container Machine gets its own IP address; access Linux services from macOS Safari/tools via the IP
- First-class CLI —
container machine create,run,stop,listwith familiar UX via the container tool - Per-project environments — create dedicated environments for each project to avoid dependency conflicts, with persistence to add tools over time
- Cross-platform dev workflow — edit in Xcode, design in macOS-native tools, build in Linux, test from Safari — all seamlessly connected
- Open-source & available now — download the latest container tool release from GitHub to get started
🔗 Resources & Links
- Containerization on GitHub — Apple's open-source Swift framework for running Linux containers on macOS
- WWDC26 Sessions — Full session catalog including "Meet Containerization" (WWDC25 reference session)
- Vapor — Swift web framework used in the demo