WWDC26 — Discover Container Machines

WWDC26 — Discover Container Machines

Michael (Containerization Team, Apple) · ~11 min · Apple Developer
Video thumbnail — WWDC26: Discover Container Machines
⏱ ~11 min 🎤 Michael 🏢 Apple 🏷 Containers · macOS · Linux · WWDC26 · Cross-Platform · Swift

📋 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?

▶ 0:07

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

▶ 1:19

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

▶ 2:11

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.

A Container Machine must be fast and lightweight, simple to manage, provide persistence, and feel like an extension of macOS.

4 Architecture & Key Features

▶ 3:41

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 CLIcontainer machine is 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

▶ 4:36

Michael demonstrates the basic Container Machine workflow:

Create

container machine create --name my-machine --default alpine

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

# Run a command inside the Container Machine container machine run echo "Hello from Linux!" # Check the runtime environment container machine run uname # prints "Linux" uname # on macOS prints "Darwin"

Interactive Shell

# Start an interactive session container machine run

Running without additional arguments starts an interactive shell inside the Container Machine.

6 Seamless Host Integration

▶ 6:05

The key differentiator is how seamlessly Container Machine integrates with macOS:

Automatic User Mapping

  • whoami on macOS returns Michael
  • whoami inside the Container Machine returns Michael — the same user

Consistent Working Directory

  • pwd on macOS shows your home directory
  • pwd inside 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.

Automatic user creation, filesystem sharing, and having a consistent working directory results in a seamless experience — it feels like you're just in a different shell, not a different machine.

7 Demo — Cross-Platform Vapor Web Server Workflow

▶ 7:07

Michael demonstrates a real-world cross-platform development workflow with a Vapor-based Swift web server:

The Workflow

  1. Edit in Xcode on macOS — the project (Package.swift, source code, public assets) is edited natively on the Mac
  2. Use macOS tools — e.g., Icon Composer to create and edit icons for the web app
  3. Build & run in Linux — the Container Machine has the Swift toolchain installed; compile and run the Vapor server inside the Linux environment
  4. Test from macOS — open Safari and access the web server via the Container Machine's IP address + port

Key Commands

# List all Container Machines (shows name, IP, resources) container machine list # Start interactive shell in the Container Machine container machine run # Files are already available — no copy needed ls # shows Package.swift, Sources/, Public/

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.

Edit in Xcode, design icons in Icon Composer, build in Linux, test in Safari — all without copying files, all without context switching. This is what "feels like an extension of macOS" means in practice.

🎯 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 CLIcontainer machine create, run, stop, list with 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

Timestamp Index

▶ 0:07 Introduction — Michael, Containerization team
▶ 0:15 Containerization: Swift framework for Linux containers
▶ 0:36 Container Machine — fast + persistent + native
▶ 1:19 Containerization framework recap (WWDC25)
▶ 1:45 VM-based isolation & sub-second start times
▶ 1:55 Container tool CLI — open source
▶ 2:11 Design principles overview
▶ 2:19 Fast & lightweight — easy switching
▶ 2:34 Quick creation — per-project environments
▶ 2:52 Persistence — add tools over time
▶ 3:03 Native integration — no context switching
▶ 3:41 Architecture: OCI images, VM isolation, stateful
▶ 4:19 Host integrations: user mapping, shared FS, terminal
▶ 4:36 Demo: container machine CLI overview
▶ 4:57 Creating a Container Machine from Alpine
▶ 5:30 Running echo and uname (Darwin vs Linux)
▶ 6:05 User mapping: whoami returns same user
▶ 6:23 Interactive shell session
▶ 6:55 Consistent working directory demo
▶ 7:07 Vapor web server project setup
▶ 7:51 container machine list — IPs and resources
▶ 8:17 Building and running Vapor in Linux
▶ 8:48 Configuring hostname in Xcode for networking
▶ 9:19 Compile, run, and access from Safari
▶ 9:41 Icon Composer — editing icons on macOS
▶ 10:24 Live file update — icon changes appear instantly
▶ 10:37 Recap: container speed + VM persistence + native feel
▶ 10:51 Get started — download from GitHub