UnixImageImpl
Defined in: packages/core/src/image.ts:102
Concrete implementation of UnixImage.
Remarks
Section titled “Remarks”Produced by UnixBuilderImpl.build and consumed by a
BootRuntime — callers normally obtain one via
await Unix().use(...).build() and hand it to
nodeRuntime().boot(image), testRuntime().boot(image), etc. Do not
instantiate directly.
Holds the merged MergedConfig, the frozen stack of filesystem
layers (baseFs plus every .run() step), a content-addressable
LayerStore, and the build cache that memoizes .run() steps
across subsequent builds. The image itself is immutable; multiple
instances can boot from it without interfering.
Example
Section titled “Example”import { Unix, stdSystem } from '@fishnet/core'import { testRuntime } from '@fishnet/runtime'
const image = await Unix().use(stdSystem()).build() // UnixImageImplconst sys = await testRuntime().boot(image)Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UnixImageImpl(
init):UnixImageImpl
Defined in: packages/core/src/image.ts:109
Parameters
Section titled “Parameters”ImageInit
Returns
Section titled “Returns”UnixImageImpl
Properties
Section titled “Properties”buildCache
Section titled “buildCache”
readonlybuildCache:BuildCache
Defined in: packages/core/src/image.ts:107
layerStore
Section titled “layerStore”
readonlylayerStore:LayerStore
Defined in: packages/core/src/image.ts:105
Content-addressable store of all layers in this image.
Implementation of
Section titled “Implementation of”topLayerId
Section titled “topLayerId”
readonlytopLayerId:string|undefined
Defined in: packages/core/src/image.ts:106
ID of the topmost layer (most recent .run() step, or base). undefined only if image has no FS.
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”createBootContext()
Section titled “createBootContext()”createBootContext():
BootContext
Defined in: packages/core/src/image.ts:118
See UnixImage.createBootContext. Returns a shallow-cloned, read-only boot context.
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”extend()
Section titled “extend()”extend():
UnixBuilder
Defined in: packages/core/src/image.ts:131
See UnixImage.extend. Returns a new builder seeded with this image’s frozen state.