Properties:
idstringnamestring | nullanonymousbooleanavailableInstring[]bytes?number | nullclassArtifactClasscreatedAtstringupdatedAtstringerror?string | nullexpiresAt?string | nulllayer_count?number | nulloriginImageOriginregionstringretentionArtifactRetentionrawRetentionstringsource?ImageSource | nullstatusImageStatusformatVersion?numberformatOutdatedbooleanplatformbooleandefaultbooleandeprecatedbooleandiskMibnumber | null
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Image(image: api.ImageListItem): Image;Parameters:
imageapi.ImageListItem
Returns:
Image
ImageBuilder
Section titled “ImageBuilder”Methods
Section titled “Methods”cmd(...args: readonly string[]): ImageBuilder;Parameters:
...args: readonly string[]
Returns:
ImageBuilder
entrypoint()
Section titled “entrypoint()”entrypoint(...args: readonly string[]): ImageBuilder;Parameters:
...args: readonly string[]
Returns:
ImageBuilder
env(name: string, value: string): ImageBuilder;Parameters:
namestringvaluestring
Returns:
ImageBuilder
env(values: Record<string, string>): ImageBuilder;Parameters:
valuesRecord<string, string>
Returns:
ImageBuilder
env(nameOrValues: string | Record<string, string>, value?: string): ImageBuilder;Parameters:
nameOrValuesstring | Record<string, string>value?string
Returns:
ImageBuilder
fromDockerfile()
Section titled “fromDockerfile()”fromDockerfile(dockerfile: string): ImageBuilder;Parameters:
dockerfilestring
Returns:
ImageBuilder
fromRegistry()
Section titled “fromRegistry()”fromRegistry(ref: string): ImageBuilder;Parameters:
refstring
Returns:
ImageBuilder
pipInstall()
Section titled “pipInstall()”pipInstall(...packages: readonly string[]): ImageBuilder;Parameters:
...packages: readonly string[]
Returns:
ImageBuilder
runCommands()
Section titled “runCommands()”runCommands(...commands: readonly string[]): ImageBuilder;Parameters:
...commands: readonly string[]
Returns:
ImageBuilder
toDockerfile()
Section titled “toDockerfile()”toDockerfile(): string;Returns:
string
toRequestSource()
Section titled “toRequestSource()”toRequestSource(): { source: NonNullable<api.CreateImageRequest["source"]> } | { dockerfile: string };The POST /images source this builder describes (parity with Python’s
ImageBuilder.build_request_source): a bare registry ref with no steps
is a registry IMPORT (source: {type: 'registry', ref} — pulled by the
runner, no builder VM); anything else is a Dockerfile build. Sending a
FROM ref Dockerfile for a plain ref made every images.pull and
createFromBuild(ImageBuilder.fromRegistry(..)) spin up a builder VM
(seen live on the PR #2008 preview).
Returns:
{ source: NonNullable<api.CreateImageRequest["source"]> } | { dockerfile: string }
user()
Section titled “user()”user(name: string): ImageBuilder;Parameters:
namestring
Returns:
ImageBuilder
workdir()
Section titled “workdir()”workdir(path: string): ImageBuilder;Parameters:
pathstring
Returns:
ImageBuilder
ImagesService
Section titled “ImagesService”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ImagesService( http: AxiosInstance, control?: HttpTransport | HttpTransportConfig): ImagesService;Parameters:
httpAxiosInstancecontrol?HttpTransport | HttpTransportConfig
Returns:
ImagesService
Methods
Section titled “Methods”build()
Section titled “build()”build(builder: ImageBuilder, options: BuildImageOptions = {}): Promise<Image>;Parameters:
builderImageBuilderoptionsBuildImageOptions = {}
Returns:
Promise<img />
delete()
Section titled “delete()”delete(imageId: string): Promise<void>;Parameters:
imageIdstring
Returns:
Promise<void>
followBuildLogs()
Section titled “followBuildLogs()”followBuildLogs( imageId: string, options: BuildLogFollowOptions): Promise<BuildLogFollowResult>;Parameters:
imageIdstringoptionsBuildLogFollowOptions
Returns:
Promise<BuildLogFollowResult>
get( imageId: string, options: { wait?: 'ready'; timeout?: number } = {}): Promise<Image>;Parameters:
imageIdstringoptions{ wait?: ‘ready’; timeout?: number } = {}
Returns:
Promise<img />
iter()
Section titled “iter()”iter( options: { cursor?: string; limit?: number; name?: string; anonymous?: boolean; sandboxId?: string; platform?: 'true' | 'false' | 'any' } = {}): AsyncIterable<Image>;Parameters:
options{ cursor?: string; limit?: number; name?: string; anonymous?: boolean; sandboxId?: string; platform?: ‘true’ | ‘false’ | ‘any’ } = {}
Returns:
AsyncIterable<img />
list()
Section titled “list()”list( options: { cursor?: string; limit?: number; name?: string; anonymous?: boolean; sandboxId?: string; platform?: 'true' | 'false' | 'any' } = {}): Promise<ListResult<Image>>;Parameters:
options{ cursor?: string; limit?: number; name?: string; anonymous?: boolean; sandboxId?: string; platform?: ‘true’ | ‘false’ | ‘any’ } = {}
Returns:
Promise<ListResult<img />>
promote()
Section titled “promote()”promote(imageId: string, name: string): Promise<Image>;Name an ANONYMOUS image, making it permanent (PATCH /images/{id}).
Promotion only: an image that already has a name answers 409 — renaming a
named image is not offered (sandboxes reference images by id, so a rename
would silently relabel every sandbox created from it).
Parameters:
imageIdstringnamestring
Returns:
Promise<img />
pull()
Section titled “pull()”pull(ref: string, options: BuildImageOptions = {}): Promise<Image>;Registry-import convenience: build(ImageBuilder.fromRegistry(ref), options).
Parameters:
refstringoptionsBuildImageOptions = {}
Returns:
Promise<img />
ArtifactClass
Section titled “ArtifactClass”type ArtifactClass = 'linux' | 'windows' | (string & {})ArtifactRetention
Section titled “ArtifactRetention”type ArtifactRetention = (typeof API_IMAGE_RETENTIONS)[number] | 'unknown'ImageStatus
Section titled “ImageStatus”type ImageStatus = 'pending' | 'building' | 'ready' | 'failed' | (string & {})ImageOrigin
Section titled “ImageOrigin”type ImageOrigin = 'registry' | 'dockerfile' | 'capture' | 'windows' | (string & {})ImageSource
Section titled “ImageSource”type ImageSource = | { readonly type: 'registry'; readonly ref: string } | { readonly type: 'dockerfile'; readonly contextObject: string; readonly dockerfile: string } | { readonly type: 'named'; readonly name: string } | { readonly type: 'manifest'; readonly name: string }ImageRef
Section titled “ImageRef”Properties:
idstringnamestring | null
BuildImageOptions
Section titled “BuildImageOptions”Properties:
name?stringidleExpirySeconds?number - Idle-retention window in seconds for an ANONYMOUS image: the image is deleted once this long has passed without a sandbox being created from it (every create restarts the clock). Only withoutname. Omitted ⇒ the server maximum (DAYTONA_ANON_IMAGE_MAX_IDLE).region?stringcpuArch?CpuArch
CaptureImageOptions
Section titled “CaptureImageOptions”Properties:
name?stringidleExpirySeconds?number - Idle-retention window in seconds for an ANONYMOUS capture: deleted once this long has passed without a sandbox being created from it. Only withoutname. Same rule asimages.build: omitted or-1⇒ the server maximum (7 days by default); above it ⇒ 400. Promote the image to keep it.
ImageDto
Section titled “ImageDto”Properties:
idstringnamestring | nullanonymousbooleanavailableInstring[]bytes?number | nullclassArtifactClasscreatedAtstringupdatedAtstringerror?string | nullexpiresAt?string | nulloriginImageOriginregionstringretentionArtifactRetentionrawRetentionstringsource?ImageSource | nullstatusImageStatuslayer_count?number | nullformatVersion?number - The image’s format generation: how its artifact is stored (1 = stored by Daytona v1 and not pulled yet; 2 = the current artifact). Undefined from an API older than the field.formatOutdatedboolean -formatVersionis below the current one: the image converts on its first Linux sandbox create, or ahead of time withPOST /images/{id}/convert; other sandbox classes refuse it withIMAGE_FORMAT_OUTDATEDuntil then.platformboolean - A platform image: published by the operator and visible to every project. False from an API older than the field.defaultboolean - The platform default for its class: the image an imagelesscreate()boots.deprecatedboolean - A deprecated platform image: it still boots and resolves by id, butimages.list({ platform: 'true' })no longer lists it.diskMibnumber | null - The disk size in MiB that a sandbox created from this image gets when the create omitsdisk_mib. Set for macOS snapshots; null for every other image and from an API older than the field.
BuildLogGapReason
Section titled “BuildLogGapReason”type BuildLogGapReason = 'truncated' | 'unknown'BuildLogDoneReason
Section titled “BuildLogDoneReason”type BuildLogDoneReason = 'terminal' | 'deadline' | 'not_applicable' | 'resource_deleted' | 'unknown'BuildLogEvent
Section titled “BuildLogEvent”type BuildLogEvent = | { type: 'state'; status: string; error?: string; deadlineAt?: string } | { type: 'log'; dataBase64: string; startOffset: string; nextOffset: string; cursor: string } | { type: 'gap'; reason: BuildLogGapReason; rawReason: string; requestedOffset: string; firstAvailableOffset: string; droppedBytes: string; cursor: string } | { type: 'unavailable'; reason: string } | { type: 'source_changed'; reason: string } | { type: 'done'; result: BuildLogFollowResult } | { type: 'error'; error: string; code: string; retryable: boolean; traceId?: string }BuildLogFollowOptions
Section titled “BuildLogFollowOptions”Properties:
onLogs(chunk: string) => void | Promise<void>onEvent?(event: BuildLogEvent) => void | Promise<void>cursor?stringtimeout?number - Total observation budget in milliseconds; zero/omitted adds no deadline.signal?AbortSignal
BuildLogFollowResult
Section titled “BuildLogFollowResult”Properties:
statusstringreasonBuildLogDoneReasonrawReasonstringcursor?stringoutputCompleteboolean