unContainer

Concepts

Where data lives

Guests write to an in-memory overlay on top of a read-only distro image. Only shared images and budgeted download caches touch your disk.

What goes where

WhatWhere it livesWhen it goes away
Checkout copied into /workGuest memoryWhen the run or session ends
node_modules, .venv, target, build outputsGuest memoryWhen the run or session ends
Docker images, containers and volumesGuest memoryWhen the session closes
Guest distro images~/.cache/uncontainer/images, one per distroKept for offline reuse
Local HTTPS CA and URL registry~/.local/share/uncontainer/https, private to your accountuncontainer https disable
Named download caches~/.cache/uncontainer/projects, compressedAt cacheMaxSize, or cache clean

Both host paths follow $XDG_CACHE_HOME when it is set.

The trade-off: memory

Because guest writes stay in memory, the cost of a session is RAM, not disk. Set guest RAM at boot with --memory. session list shows GUEST RAM, the allocation, next to HOST RSS, the resident size of the host process including runtime overhead.

Budget download caches

Set cacheMaxSize in the uncontainer.json of the primary checkout (the project root outside Git). It covers all worktrees and guest variants of the project.

uncontainer.json{ "cacheMaxSize": "512MiB" }
  • Applied when a cache-enabled guest opens and whenever a snapshot is published.
  • Older snapshots are evicted first. A single snapshot larger than the budget is skipped.
  • 0B retains nothing. Without the setting, caches are unlimited.
  • Temporary archives, cache metadata and distro images fall outside the budget.

Inspect and reclaim

uncontainer cache stats --json

Reports retainedBytes, limitBytes and the size of each snapshot. A lowered limit takes effect at the next cache-enabled boot or publication.

uncontainer cache clean

Removes every saved cache of the project, from any of its worktrees. An open guest resets its cache directories before its next foreground command.