UnixImage
Defined in: packages/core/src/kernel/types.ts:2025
Frozen, immutable system configuration. Multiple instances can boot from one image.
Consumed — obtain from UnixBuilder.build() and pass to a runtime’s boot().
Remarks
Section titled “Remarks”Contains frozen filesystem layers, merged env defaults, and service
declarations. Boot via a runtime (e.g. testRuntime().boot(image)) to
create a live UnixInstance with a fresh writable overlay.
Caveat
Section titled “Caveat”Images are immutable, but Fileserver references INSIDE them are NOT
deep-copied — mutations to a memoryFS() you handed to the builder
remain visible in every booted instance. Use frozen or per-instance
fileservers for true isolation.
Example
Section titled “Example”import { Unix, stdSystem } from '@fishnet/core'import { testRuntime } from '@fishnet/runtime'const image = await Unix().use(stdSystem()).build()const a = await testRuntime().boot(image)const b = await testRuntime().boot(image)Properties
Section titled “Properties”layerStore
Section titled “layerStore”
readonlylayerStore:LayerStore
Defined in: packages/core/src/kernel/types.ts:2031
Content-addressable store of all layers in this image.
topLayerId
Section titled “topLayerId”
readonlytopLayerId:string|undefined
Defined in: packages/core/src/kernel/types.ts:2033
ID of the topmost layer (most recent .run() step, or base). undefined only if image has no FS.
Methods
Section titled “Methods”createBootContext()
Section titled “createBootContext()”createBootContext():
BootContext
Defined in: packages/core/src/kernel/types.ts:2027
Create the boot context consumed by a runtime’s boot procedure.
Returns
Section titled “Returns”extend()
Section titled “extend()”extend():
UnixBuilder
Defined in: packages/core/src/kernel/types.ts:2029
Derive a new UnixBuilder pre-loaded with this image’s frozen layers.