containerization

(★ 8,892)

Containerization is a Swift package for running Linux containers on macOS.

File Explorer

  • .gitignore
  • .spi.yml
  • .swift-format
  • .swift-format-nolint
  • .swift-version
  • CLAUDE.md
  • CONTRIBUTING.md
  • LICENSE
  • licenserc.toml
  • MAINTAINERS.txt
  • Makefile
  • Package.resolved
  • Package.swift
  • Protobuf.Makefile
  • README.md
  • SECURITY.md

# Installation Guide

swift
Prerequisites

Setup Steps

sudo xcode-select -s <PATH_TO_XCODE>

Set the active developer directory to Xcode.

container --version

Verify that the Apple container CLI is installed on PATH.

make fetch-default-kernel

Fetch the default Linux kernel required for testing.

make all

Build Containerization from sources.

make test integration

Run basic and integration tests.

Key Commands

make all

Builds all project sources.

make test

Runs the unit tests.

make integration

Runs the integration tests.

make fetch-default-kernel

Fetches the default VM kernel.

make protos

Regenerates RPC interfaces from protobuf files.

make docs

Generates API documentation.

make serve-docs

Serves the generated documentation locally.

make pre-commit

Installs the pre-commit hook for formatting and license headers.

Apple silicon Mac with macOS 26 and Xcode 26 is required.

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

git commit

View Details ▼

Commit files to the repository.

git commit

Open an editor to write a message and commit staged files to the repository:

git commit {{[-m|--message]}} "{{message}}"

Commit staged files to the repository with the specified message:

git commit {{[-F|--file]}} {{path/to/commit_message_file}}

Commit staged files with a message read from a file:

🔍

container

View Details ▼

Create and run Linux containers as lightweight virtual machines on macOS.

container system start

Start the container services (required before running containers):

container run --rm {{[-it|--interactive --tty]}} {{image}} {{sh}}

Run a container from an image interactively and remove it after it exits:

container run {{[-d|--detach]}} --name {{container_name}} {{[-p|--publish]}} {{8080:80}} {{image}}

Run a container in the background with a name and a published port:

🔍

xcode-select

View Details ▼

Switch between different versions of Xcode and the included developer tools.
Also used to update the path to Xcode if it is moved after installation.

xcode-select --install

Install Xcode's command-line tools:

xcode-select --switch {{path/to/Xcode.app/Contents/Developer}}

Select a given path as the active developer directory:

xcode-select --switch {{path/to/Xcode_file.app}}

Select a given Xcode instance and use its developer directory as the active one:

// repository documentation