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
| Key | Type | Description |
|---|---|---|
cacheMaxSize | Size string | Budget for retained cache snapshots, read from the primary checkout. Units: B, KiB, MiB, GiB. |
profiles | Object | Named boot settings, selected with --profile NAME. |
Profile keys
| Key | Type | Default | Notes |
|---|---|---|---|
distro | String | debian | debian, alpine or debian:docker. |
cpus | Integer | 1 | 1–16. |
memory | Size string | Engine default | 128MiB–4GiB, whole MiB. |
network | String | none | none or full. Not with allow. |
allow | Array of HOST:PORT | Non-empty. Not with network. | |
caches | Array of names | Directories 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.