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
| What | Where it lives | When it goes away |
|---|---|---|
Checkout copied into /work | Guest memory | When the run or session ends |
node_modules, .venv, target, build outputs | Guest memory | When the run or session ends |
| Docker images, containers and volumes | Guest memory | When the session closes |
| Guest distro images | ~/.cache/uncontainer/images, one per distro | Kept for offline reuse |
| Local HTTPS CA and URL registry | ~/.local/share/uncontainer/https, private to your account | uncontainer https disable |
| Named download caches | ~/.cache/uncontainer/projects, compressed | At 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.
{ "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.
0Bretains nothing. Without the setting, caches are unlimited.- Temporary archives, cache metadata and distro images fall outside the budget.
Inspect and reclaim
uncontainer cache stats --jsonReports retainedBytes, limitBytes and the size of each snapshot. A lowered limit takes effect at the next cache-enabled boot or publication.
uncontainer cache cleanRemoves every saved cache of the project, from any of its worktrees. An open guest resets its cache directories before its next foreground command.