A one-off check
Run the test script in a fresh copy of the checkout, including uncommitted files. Your terminal gets the output and the exit code, and the guest is gone.
uncontainer run -- sh ./tests/run.shFor developers running coding agents in parallel
unContainer gives each Git worktree its own disposable Linux session. Builds, dependencies and Docker state live in guest memory and disappear when the session closes.
No Docker Desktop, no VM manager, no sudo · macOS ARM64 / Linux ARM64
feat/api
Linux :3000files · processes · Docker
127.0.0.1:57155fix/login
Linux :3000files · processes · Docker
127.0.0.1:57161chore/deps
Linux :3000files · processes · Docker
127.0.0.1:57170cacheMaxSizeThe problem
Put four agents on four worktrees and the shared machine starts leaking between them.
The second dev server fails to start, or quietly serves the wrong branch to the agent reviewing it.
node_modules, .venv and target get copied into each checkout and stay there after the branch is merged.
Images, volumes and build cache pile up in the VM disk until somebody remembers to prune.
An install script or a confused agent can call production APIs, your LAN or any host on the internet.
Disk
A guest writes to an overlay held in memory, not to your disk. What unContainer does keep on the host is shared across worktrees and has a budget you set.
| What | Where it lives | When it goes away |
|---|---|---|
Checkout copied into /work | Guest memory | When the session closes |
node_modules, .venv, target, build outputs | Guest memory | When the session closes |
Docker images, containers and volumes in a debian:docker guest | Guest memory | When the session closes |
| Guest distro images | Host cacheOne copy per distro, shared by every worktree | Kept for offline reuse |
| Package downloads in named caches | Host cacheOne compressed snapshot per cache, repo and distro | Oldest first at cacheMaxSize, or cache clean |
The host streams each new snapshot through zstd as it saves. Debian and updated Alpine guests decompress it as they restore. For older images without zstd, the host decompresses the stream and the guest unpacks it.
Existing .tar.gz snapshots still open and switch to zstd on the next successful save. Set up a shared cache →
Put cacheMaxSize in uncontainer.json at the primary checkout. It covers every worktree and distro of the project. When a new snapshot would pass the limit, the oldest ones go first.
{
"cacheMaxSize": "512MiB",
"profiles": { … }
}uncontainer cache stats --jsonuncontainer cache cleanuncontainer session prune --dry-runThe trade-off: the cost moves to RAM. Each guest gets 128 MiB to 4 GiB, set with --memory. session list shows guest RAM and the host process’s resident size side by side. Where data lives →
Parallel agents
Each worktree gets its own session: its own files, processes and localhost. Publish the guest port and the host picks a free loopback port for each one.
Agents sharing a worktree share its session, so one can start the API while another runs integration tests against it.
~/app-api
uncontainer session open --cpus 2 --publish 3000~/app-login
uncontainer session open --cpus 2 --memory 1GiB --publish 3000uncontainer session listBRANCH DISTRO HOST RSS GUEST RAM vCPU NETWORK PORTS feat/api debian 203 MiB 2048 MiB 2 none 57155→3000 fix/login debian 255 MiB 1024 MiB 2 none 57161→3000
Real output, trimmed to fit. Agents read the same fields with session list --json.
Local HTTPS · new in v0.4.0
Start a dev server with --https and its worktree gets its own name under uncontainer.localhost, signed by a local CA that only your account trusts.
The URL survives restarts, even on a different guest port. While the app is down it answers 503 instead of reaching another branch.
Source edits on the host are copied into the guest as you save, so Vite’s watcher sees them and hot updates arrive over WebSockets. HTTP/2 and HTTP/1.1 both work.
once per account
uncontainer https enable~/checkout
uncontainer run --https checkout:5173 -- ./node_modules/.bin/vite --port 5173 --strictPort~/catalog
uncontainer run --https catalog:5173 -- ./node_modules/.bin/vite --port 5173 --strictPortmacOS serves on port 443 through a user launch agent. On Linux, keep uncontainer https proxy running and the URLs end in :8443.
Isolation
New guests start with no outbound network. Allow exactly the registries a build needs, and nothing else answers. Guest DNS resolves only the names you listed.
The guest sees a snapshot of your checkout in /work, not your home directory, your SSH keys or your other projects.
uncontainer run -- curl -fsS https://example.comuncontainer session open --allow pypi.org:443 --allow files.pythonhosted.org:443uncontainer run --network full -- curl -fsS https://example.comWorkloads
Pick Debian, Alpine or Debian with Docker, size it with --cpus and --memory, and save the settings as profiles in uncontainer.json.
Run the test script in a fresh copy of the checkout, including uncommitted files. Your terminal gets the output and the exit code, and the guest is gone.
uncontainer run -- sh ./tests/run.shOne worktree downloads from PyPI. The next one installs from the shared cache with the network off. Each keeps its own .venv.
uncontainer run --profile deps -- uv sync --lockeduncontainer run --profile test -- uv sync --locked --offlineEach session gets its own Docker daemon, images and volumes. Close it and they are gone. The base image stays cached for the next worktree.
uncontainer session open --distro debian:docker --network full --publish 3000uncontainer session exec -- docker compose up -dGuests start from a plain distro image. Tools like uv, Node or Cargo need to be available in the guest. Share downloads across worktrees → · Docker and Compose →
How it works
unContainer runs the real Linux kernel compiled to WebAssembly through unkernel. Each session is a process on your host, not a VM you manage.
The distro image is mounted read-only under an in-memory overlay. That is why a guest can install, build and run Docker without growing your disk.
Debian or Alpine · ARM64
Agent skill
The unContainer skill teaches Codex and Claude Code when a fresh check is enough, when to keep a session open for a build or a running service, how to serve a dev app at a local HTTPS URL, and to close what it opened.
npx skills add iddar/uncontainer“Build this checkout in Linux, then run the tests in the same session using that build.”
“Start the API on port 3000 in this worktree and tell me which host port to open.”
“Serve this branch’s Vite app over HTTPS as checkout and give me the URL.”
Install
The installer verifies the archive checksum and puts uncontainer in ~/.local/bin. The first run downloads the guest image once. Later, uncontainer update upgrades the CLI and the images you use, after checking each download against the release registry, which lists every release and image with its checksum.
Runs on macOS ARM64 and Linux ARM64 with glibc. Guests are ARM64. Host edits reach an open session when you close and reopen it, and stream live into run --https. Local HTTPS needs mkcert.
curl -fsSL https://uncontainer.dev/install | shuncontainer run -- uname -muncontainer update --check