ArchBox is a lightweight container management tool that simplifies the process of creating and managing Linux containers for different architectures. It provides a unified interface for working with various Linux distributions across multiple CPU architectures.
- Multi-distribution support - Ubuntu, Debian, and more
- Multi-architecture support - amd64, arm64, armhf, ppc64le, s390x, riscv64
- Container management - Create, list, remove containers
- State tracking - Persistent container state management
- JSON configuration - Easy to extend with new distributions
- Lightweight - Minimal dependencies and fast operation
- noble (24.04 LTS)
- jammy (22.04 LTS)
- focal (20.04 LTS)
- bookworm (12)
- bullseye (11)
- amd64 - Intel x86 64-bit
- arm64 - ARM 64-bit (mapped to arm64v8)
- armhf - ARM 32-bit hard float (mapped to arm32v7)
- ppc64le - PowerPC 64-bit little-endian
- s390x - IBM System/390 64-bit
- riscv64 - RISC-V 64-bit
- Docker installed and running
- GCC compiler (for building archbox itself)
- Make (optional, for using the Makefile)
makegcc -Wall -Wextra -O2 -std=c11 -o archbox archbox.c json.csudo ./install.shThis installs to /opt/archbox/ with a symlink in /usr/local/bin/.
Simply place the archbox binary in your project root directory or add it to your PATH.
archbox <command> [options]archbox list# Create Ubuntu 24.04 for amd64
archbox create ubuntu noble amd64
# Create Debian 12 for arm64
archbox create debian bookworm arm64
# Create with custom name
archbox create ubuntu noble amd64 mycontainerarchbox ps# Run interactive shell
archbox exec mycontainer
# Run specific command
archbox exec mycontainer ls -la /root# Stop container
archbox stop mycontainer
# Remove container
archbox rm mycontainer
# Stop and remove
archbox stop mycontainer && archbox rm mycontainer# Show container state
archbox state mycontainer
# Reset container state
archbox reset mycontainerArchBox uses distros.json for distribution and architecture configuration. The file is searched in the following order:
- Next to the
archboxbinary /usr/local/share/archbox/distros.json/usr/share/archbox/distros.json
Edit distros.json to add new distributions:
{
"newdistro": {
"versions": {
"version1": {
"architectures": ["amd64", "arm64"]
}
},
"arch_map": {
"amd64": "amd64",
"arm64": "arm64v8"
}
}
}- Configuration Loading: ArchBox loads distribution data from
distros.json - Architecture Mapping: Maps user-friendly architecture names to Docker platform names
- Container Management: Uses Docker API to create and manage containers
- State Tracking: Maintains persistent state in
~/.archbox/ - Command Execution: Provides interface for container interaction
# 1. Install archbox
sudo ./install.sh
# 2. List available options
archbox list
# 3. Create container for development
archbox create ubuntu noble amd64 dev-env
# 4. Work in container
archbox exec dev-env
# 5. Clean up when done
archbox rm dev-env# Create containers for different architectures
archbox create ubuntu noble amd64 ubuntu-amd64
archbox create ubuntu noble arm64 ubuntu-arm64
archbox create debian bookworm s390x debian-s390x
# Test across architectures
archbox exec ubuntu-amd64 uname -m
archbox exec ubuntu-arm64 uname -m
archbox exec debian-s390x uname -mEnsure Docker is installed and running:
docker --version
docker infoIf you get permission errors, you may need to run Docker commands with sudo or add your user to the docker group:
sudo usermod -aG docker $USERIf distros.json is not found, check:
# Find where archbox is installed
which archbox
# Check for distros.json in expected locations
ls -la /usr/local/share/archbox/
ls -la /usr/share/archbox/Ensure the requested distribution and architecture combination is supported:
archbox listRemove built files:
make cleanUninstall system installation:
sudo make uninstall
# Or if using install script:
sudo /opt/archbox/uninstall.sh