Skip to content

createContainerManager

createContainerManager(caps): ContainerManager

Defined in: packages/runtime/src/container/runtime.ts:609

Create a registry-aware ContainerManager bound to a platform’s capabilities.

PlatformCapabilities

Platform capabilities (from nodeRuntime / browserRuntime).

ContainerManager

A ContainerManager that tracks named containers + supervises restarts.

Preferred over createContainerRuntime when you want to list(), get(), destroy(), or stopAll() named containers — i.e. anything resembling a long-lived shell session.

import { createContainerManager, nodeRuntime } from '@fishnet/runtime'
const mgr = createContainerManager((await nodeRuntime()).caps)
await mgr.run(image, { bin: 'echo', argv: ['hi'] })
await mgr.stopAll()