unContainer

Reference

uncontainer.json

Optional project configuration at the Git worktree root, or the current directory outside Git.

Example

uncontainer.json{ "cacheMaxSize": "512MiB", "profiles": { "test": { "cpus": 2, "memory": "512MiB", "network": "none", "caches": ["uv"] }, "deps": { "cpus": 2, "caches": ["uv"], "allow": ["pypi.org:443", "files.pythonhosted.org:443"] } } }

Top-level keys

KeyTypeDescription
cacheMaxSizeSize stringBudget for retained cache snapshots, read from the primary checkout. Units: B, KiB, MiB, GiB.
profilesObjectNamed boot settings, selected with --profile NAME.

Profile keys

KeyTypeDefaultNotes
distroStringdebiandebian, alpine or debian:docker.
cpusInteger11–16.
memorySize stringEngine default128MiB–4GiB, whole MiB.
networkStringnonenone or full. Not with allow.
allowArray of HOST:PORTNon-empty. Not with network.
cachesArray of namesDirectories under /home/user/.cache. Lowercase letters, digits, - and _.

Unknown keys are rejected. A profile is only loaded when you pass --profile. Explicit distro, CPU, memory and network flags override profile settings, and a network flag replaces the whole policy. Edits apply to guests booted afterwards.