ContainerSpec
Defined in: packages/runtime/src/container/types.ts:51
Declarative description of a container — the input to ContainerRuntime.create.
A spec is the serializable shape of what to run: the namespace (rootfs + mounts +
devices + permissions), the PID-1 process (bin + argv + env + cwd), and resource
limits. It is fully immutable once constructed — lifecycle state lives on the
Container handle returned from create(), not here.
Remarks
Section titled “Remarks”Build a spec either by calling specFromImage (derives sensible defaults from a UnixImage) or by hand when you need fine control. Compose two specs with mergeSpecs.
Properties
Section titled “Properties”labels?
Section titled “labels?”
readonlyoptionallabels?:Readonly<Record<string,string>>
Defined in: packages/runtime/src/container/types.ts:55
Free-form labels for tooling (e.g. container.rm, container.restart).
limits?
Section titled “limits?”
readonlyoptionallimits?:ResourceLimits
Defined in: packages/runtime/src/container/types.ts:61
Per-container resource limits (pids, fds, bytes).
readonlyname:string
Defined in: packages/runtime/src/container/types.ts:53
Container name — unique within a ContainerManager.
namespace
Section titled “namespace”
readonlynamespace:NamespaceSpec
Defined in: packages/runtime/src/container/types.ts:57
Namespace shape: rootfs, mounts, binds, devices, permissions.
process
Section titled “process”
readonlyprocess:ProcessSpec
Defined in: packages/runtime/src/container/types.ts:59
PID-1 process description.