Skip to content

Add container machine for managing persistent Linux environments#1662

Merged
realrajaryan merged 1 commit into
apple:mainfrom
realrajaryan:container-machine
Jun 8, 2026
Merged

Add container machine for managing persistent Linux environments#1662
realrajaryan merged 1 commit into
apple:mainfrom
realrajaryan:container-machine

Conversation

@realrajaryan

Copy link
Copy Markdown
Member

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

container runs each workload in an ephemeral VM, so there's no built-in way to keep a persistent Linux environment you can log into and work in. container machine adds one.

A container machine is a lightweight, persistent, and integrated Linux environments that feel like an extension of your Mac, created from standard OCI images with a familiar UX. The login user matches your host account with passwordless sudo, your home directory is mounted inside the VM, and each machine keeps its filesystem and runs the image's own init system (such assystemd or openrc).

container machine create alpine:3.22 --name my-machine
container machine run -n my-machine # interactive shell
container machine set -n my-machine cpus=4 memory=8G

Subcommands: create, run, list (ls), inspect, set, set-default, logs, stop, delete (rm); m aliases machine. Docs added to docs/command-reference.md (Machine Management) and docs/how-to.md ("Use container machines").

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

@github-actions github-actions Bot added documentation Improvements or additions to documentation cli labels Jun 8, 2026
@realrajaryan realrajaryan removed the documentation Improvements or additions to documentation label Jun 8, 2026
`container machine` creates and manages container machines: lightweight,
persistent, and integrated Linux environments that feel like an extension
of your Mac, created from standard OCI images with a familiar UX.

Subcommands: create, run, list (ls), inspect, set, set-default, logs,
stop, delete (rm). `m` aliases machine. Adds command-reference and
how-to docs.

Co-authored-by: Jaewon Hur <jaewon_hur@apple.com>
Co-authored-by: John Logan <john_logan@apple.com>
Co-authored-by: Michael Crosby <michael_crosby@apple.com>
Co-authored-by: Eric Ernst <eric_ernst@apple.com>
Co-authored-by: Danny Canter <danny_canter@apple.com>
Signed-off-by: Raj Aryan Singh <rajaryan_singh@apple.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Code Coverage

Tier Line Coverage
Unit 33.16%
Integration 21.11%
Combined 53.47%

@realrajaryan realrajaryan merged commit b2994ac into apple:main Jun 8, 2026
3 checks passed
@crosbymichael crosbymichael changed the title Add container machine for managing persistent Linux VMs Add container machine for managing persistent Linux environments Jun 8, 2026
@realrajaryan realrajaryan deleted the container-machine branch June 8, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants