Skip to content
These docs are still under construction and may contain outdated references to Earthly and/or broken links.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Apple Container

Apple Container is Apple's native container runtime for macOS on Apple Silicon. It is a lightweight, daemonless container engine that runs Linux containers via macOS virtualization.

EarthBuild supports Apple Container as a native container engine on macOS (darwin/arm64), allowing you to run builds and manage the BuildKit daemon without Docker Desktop or Podman.

Prerequisites

  • macOS on Apple Silicon (arm64, M-series chips, macOS 26+).

  • Apple Container CLI installed:

    brew install container
  • Start the container system service:

    container system start --enable-kernel-install

Getting started

When earth starts, it automatically detects available container engines in this order:

  1. Docker

  2. Podman

  3. Apple Container

If Docker is not running and Apple Container is available, EarthBuild will automatically use Apple Container.

To explicitly configure EarthBuild to always use Apple Container:

earth config global.container_frontend apple-container

You can verify the configuration in your ~/.earth/config.yml file:

Then, run a build to verify the integration:

You should see BuildKit start up inside Apple Container:

Features & Integration Details

Rosetta 2 Translation

Apple Container runs containers with --rosetta enabled by default. This allows executing both linux/arm64 and linux/amd64 binaries within your build steps seamlessly using macOS Rosetta translation.

Automatic Resource Sizing

On macOS, EarthBuild automatically probes host hardware and allocates 25% of system RAM (minimum 4GB) and all CPU cores to the BuildKit daemon VM container, ensuring high performance without manual VM tuning.

Troubleshooting

"container system service is not running"

Ensure the Apple Container service is running:

If it is stopped, start it with:

Checking Container Logs

If the daemon fails to start, inspect the container logs:

Cleaning Up

To reset and remove the EarthBuild daemon and cache volume in Apple Container:

Last updated