apple-container

schpet's avatarfrom schpet

Apple's native container runtime for macOS. Use this skill instead of Docker when running on macOS with Apple silicon. The `container` CLI provides OCI-compatible container management optimized for Apple silicon.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 9, 2026

When & Why to Use This Skill

Apple Container is a high-performance, native container runtime specifically engineered for macOS on Apple silicon. It serves as a lightweight, OCI-compatible alternative to Docker, allowing developers to build, run, and manage Linux containers with optimized resource efficiency and familiar CLI syntax. By leveraging macOS-native virtualization, it provides a seamless experience for developers needing to maintain containerized workflows on M-series chips without the overhead of traditional container engines.

Use Cases

  • Local Development: Use as a lightweight replacement for Docker Desktop to develop, run, and test microservices on M-series Macs with superior performance and lower resource consumption.
  • Image Building and Management: Build OCI-compliant container images from Dockerfiles and push them to standard registries, ensuring full compatibility with cloud production environments.
  • Isolated Environment Testing: Quickly spin up isolated Linux environments (e.g., Ubuntu) to execute scripts, test software dependencies, or debug code in a clean sandbox without cluttering the host macOS system.
  • DevOps Workflow Optimization: Integrate container management into local automation scripts using the 'container' CLI for faster CI/CD feedback loops on Apple silicon hardware.
nameapple-container
descriptionApple's native container runtime for macOS. Use this skill instead of Docker when running on macOS with Apple silicon. The `container` CLI provides OCI-compatible container management optimized for Apple silicon.

Apple Container

Overview

Apple Container is a native container platform for macOS that runs Linux containers as lightweight virtual machines. It should be used instead of Docker on macOS with Apple silicon.

The container CLI is installed and available. It produces and consumes OCI-compatible container images, so images work with any standard container registry.

Requirements

  • Mac with Apple silicon
  • macOS 26 or later

Quick Start

# Start the system service (required once)
container system start

# Run a container
container run -it ubuntu:latest /bin/bash

# Build an image
container build -t myimage .

# List containers
container list

# Stop a container
container stop <container-id>

Common Commands

Command Description
container run Run a container
container build Build an image from Dockerfile
container list List containers
container stop Stop running containers
container exec Run command in running container
container logs Fetch container logs
container image list List images
container system start Start the system service
container system stop Stop the system service

Docker Compatibility

The container CLI uses familiar Docker-like syntax:

Docker Command Container Command
docker run container run
docker build container build
docker ps container list
docker stop container stop
docker exec container exec
docker logs container logs
docker images container image list

Troubleshooting

Builder Freezes

The buildkit builder can freeze, often due to insufficient memory. To fix:

  1. Find and kill the frozen builder process:

    ps aux | grep buildkit
    kill -9 <pid>
    
  2. Restart with more resources:

    container builder start --cpus 6 --memory 8g
    

References