A different kind of container engine

Containers with no daemon, stored file by file

One static binary runs your Docker and OCI images. When no container runs, nothing runs. A file that many images share is stored once and read into memory once.

  • 4.1 msto start a container
  • 0processes when no container runs
  • −67%memory for file cache
  • −70%disk for the same images

An example: install podbag with the install script, run a container that prints hello, then see that no podbag process is left running.

Features

Light where other engines are heavy.

No daemonWhen no container runs, nothing runs.
One static binaryAbout 4 MB on Linux.
Files, not layersA file that many images share is stored once and cached once: less disk, less memory.
FastA container starts in about 4 ms on Linux.
Works with Docker toolsDocker and OCI images, the docker CLI, Compose and buildx.
With or without rootThe same program works both ways.
Linux, macOS, Windowsx86_64 and arm64. Windows support is experimental.
Open sourceApache License 2.0.

What stays running

Three containers start, then stop. Watch the processes on the machine.

Files, not layers

Other engines store images as layers. podbag stores them as files.

Animation. Two images share most of their files. As layers, a layer is kept once only when it is the same; image B's top layer differs by one file, so spring.jar and jackson.jar are stored again: 8 files. podbag stores each file once: 6 files. Measured with 8 Spring services in 2 releases: 2,970 MiB on disk with layers (Docker), 902 MiB with podbag.
  • A layer store (Docker, Podman, Kiri) keeps a layer once only when the whole layer is the same. If one file differs, the whole layer is stored again, with the files it shares with other layers.
  • podbag keeps each file once. An image is a list of paths that point to the files.
  • For 8 Spring services in 2 releases: 902 MiB on disk against Docker's 2,970 MiB.

Stored once, cached once

When containers read the same file, the kernel keeps one copy of it in memory. With layers, the same file in two layers is two files, so it is read into memory twice. Starting 16 Spring services read this much into memory:

Page cache of 16 Spring servicesMiB read into memory to start them · lower is better
Docker982 MiB
podbag324 MiB

Install

Install script (Linux and macOS)

curl -fsSL https://raw.githubusercontent.com/SteelCrab/podbag/main/install.sh | sh
  • Downloads the file for your system and checks its SHA-256 sum.
  • Installs it in /usr/local/bin, with sudo when needed.
  • On Ubuntu 24.04 and later, adds the AppArmor profile that rootless containers need.

Download

Get a file from the latest release, and check it with SHA256SUMS.

SystemFile
Linux, x86_64podbag-x86_64-linux
Linux, arm64podbag-aarch64-linux
macOS, Apple siliconpodbag-aarch64-macos
Windows, x86_64 (experimental)podbag-x86_64-windows.exe
Windows, arm64 (experimental)podbag-aarch64-windows.exe

Windows needs WSL 2. Run wsl --install once.

Cargo (Linux)

cargo install podbag

Build from source

See docs/build.md for Linux, macOS and Windows.

Use

podbag run --rm alpine echo hello                 # pull the image if needed, run, remove
podbag run -d --name web -p 8080:80 nginx:alpine  # run in the background
podbag ps                                         # list containers
podbag logs -f web                                # follow the logs
podbag exec -it web sh                            # open a shell in the container
podbag stop web && podbag rm web                  # stop and remove

With the docker CLI, Compose and buildx

podbag system service &      # Linux (on macOS: podbag vm start)
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podbag/docker.sock
docker compose up -d

Benchmarks

Medians on one Linux VM (4 CPUs, 3.8 GiB, arm64) with podbag 0.1.0, Podman 5.7.0, Docker 29.1.3 and Kiri 0.2.1. Lower is better.

Start a containerms, median of 100 starts with no network
podbag (rootless)4.1 ms
podbag (root)4.4 ms
Kiri9.1 ms
Podman46.4 ms
Docker73.8 ms
Memory for 100 containersMiB the system holds, one network
podbag (root)105 MiB
Kiri109 MiB
podbag (rootless)117 MiB
Podman203 MiB
Docker562 MiB
Disk for 8 Spring services in 2 releasesMiB after their containers ran
podbag (root)902 MiB
podbag (rootless)944 MiB
Podman1,783 MiB
Kiri2,960 MiB
Docker2,970 MiB
Page cache of 16 Spring servicesMiB read into memory to start them · lower is better
podbag (rootless)324 MiB
podbag (root)333 MiB
Kiri960 MiB
Podman975 MiB
Docker982 MiB

All numbers and how they were measured: benchmarks and the Spring microservices benchmark.

Compared with other tools

podbagDockerOrbStackColimaKiri
Runs onLinux, macOS, Windows¹Linux; macOS and Windows with Docker DesktopmacOSmacOS, LinuxLinux, macOS, Windows
Runs in the backgroundnothing once the last container ends (Mac: a 2 MiB standby)dockerd, containerd, a shim per containera Linux VM with Docker Enginea Lima VM with Docker or containerda daemon; on macOS and Windows a small VM
Image storagefiles, each kept oncelayerslayerslayerslayers, unpacked when first used
Mac: docker run start, median²14.4 ms97.4 ms90.4 ms73.6 ms11.8 ms
Mac: memory 6 minutes after the last container²1.7 MiB950 MiB795 MiB1.54 GiB12 MiB
LicenseApache-2.0Apache-2.0; Docker Desktop is paid for larger companiesproprietaryMITApache-2.0

¹ Experimental. ² Measured on one Mac, with Docker Desktop for Docker.

Docker Engine: the docker CLI talks to dockerd, which talks to containerd, which starts a shim per container; images are layers. podbag: the command creates each container itself, a keeper per user watches them while they run; images are files, each kept once.

The intro, in 26 seconds

podbag intro: a container starts in about 4 ms on Linux and nothing runs once it ends; images stored file by file take 902 MiB of disk against Docker's 2,970 MiB; Linux, macOS and Windows.

Documentation

  • Usage: commands, volumes, networks, limits, Docker API, macOS, Windows.
  • Architecture: how podbag differs from Docker, and where it is still behind.
  • Build from source: Linux, macOS, Windows.
  • Contributing: tests, pull requests, translations.

Read the README for a short start.