ContainerRuntime
Defined in: packages/runtime/src/container/types.ts:490
Minimal container-creation surface: build one container from a spec, or boot a legacy image.
Consumed — obtain from createContainerRuntime. The manager (ContainerManager) extends this with a tracking registry; reach for the runtime directly when you don’t need lifecycle tracking.
Invariant
Section titled “Invariant”create() returns a Container in the created state —
caller must start() before the container runs.
Invariant
Section titled “Invariant”boot() is a backward-compat escape hatch that produces a
UnixInstance directly (pre-container world); it does NOT
go through the container lifecycle.
Example
Section titled “Example”import { createContainerRuntime, nodeRuntime } from '@fishnet/runtime'
const rt = createContainerRuntime((await nodeRuntime()).caps)const c = await rt.create({ name: 'demo', namespace: {...}, process: {...} })Extended by
Section titled “Extended by”Methods
Section titled “Methods”boot()
Section titled “boot()”boot(
image,opts?):Promise<UnixInstance>
Defined in: packages/runtime/src/container/types.ts:494
Legacy: boot an image directly, bypassing the container lifecycle.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<UnixInstance>
create()
Section titled “create()”create(
spec,opts?):Promise<Container>
Defined in: packages/runtime/src/container/types.ts:492
Create a new container from a spec. Container starts in created state.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<Container>