Skip to main content
The apple_container machine provider reaches a running container under Apple’s container tool, and the machine runtime runs captured programs in it. You start the containers; Mirage only runs programs in them. Needs Apple silicon and macOS 26 or later. Python SDK and Node.

Installation

Install and start Apple’s container. From the Mirage repository root, build the machine image, which carries Mirage and fuse3, and start a container from it:

Usage

captures defaults to @external: every program Mirage does not have itself. Name @python to run Python in the container too. For one container per agent, make each container a machine of its own and send each session to its machine with a route.

Connecting the workspace

A program in the container opens workspace files at the same paths as in Mirage, so the container must see the mounts there. mount_type picks how, as for Docker: ssh serves every mount over container exec (the image needs sshfs), fuse leaves them to a Mirage inside, and both mixes the two. The default image lacks sshfs; add it with apt-get install sshfs. For fuse, write the same mounts at the same paths into sandbox.yaml, and start Mirage with it in the container:
  • This workspace’s mount modes and permissions do not reach those files; sandbox.yaml decides.
  • Keep the container’s paths in step with the host’s mounts yourself.

Runtime behavior

Notes

  • Set container to the name of a running container.
  • The image needs a POSIX-compatible /bin/sh. The session’s environment wins over the image’s. The working directory must already exist in the container.
  • Host directories reach the container only through --volume. A service on your Mac is not at 127.0.0.1 inside; Apple’s host integration guide sets up host.container.internal.
  • Each container is its own VM, so agents with one each share no files, processes, CPU or memory. Give each one that agent’s rules: the default profile in its sandbox.yaml.
  • A timeout does not kill the program: container 1.4.1 does not deliver signals into the guest (apple/container#1941).