DockerService
Section titled “DockerService”Docker Engine status inside the sandbox (sandbox.docker). Read-only:
nothing here starts or restarts Docker. The sandbox env variable
DAYTONA_DOCKER_START chooses how Docker starts: auto (default; start
the image’s dockerd when it ships one), entrypoint (the image’s own
entrypoint starts Docker; only wait for it) or off (neither start nor
wait; state disabled). Unknown values count as auto.
A sandbox whose daemon predates this feature answers status() and
waitUntilReady() with a NotFoundError (404).
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DockerService(transport: HttpTransport): DockerService;Parameters:
transportHttpTransport
Returns:
DockerService
Methods
Section titled “Methods”status()
Section titled “status()”status(): Promise<DockerStatus>;Current Docker Engine status for this boot, answered immediately.
Throws NotFoundError (404) against an older daemon without the route.
Returns:
Promise<DockerStatus>
waitUntilReady()
Section titled “waitUntilReady()”waitUntilReady(options: DockerWaitOptions = {}): Promise<DockerStatus>;Poll the Docker status until it is ready and return that status.
Each poll asks the daemon to hold for up to one second while Docker is
starting; answers that come back sooner are spaced 500 ms apart.
Throws DockerNotReadyError as soon as Docker settles in a state
that cannot become ready (failed, not_present, disabled,
unmanaged, unsupported, or deferred with reason
function-ready-template), and DockerWaitTimeoutError when the
budget runs out while Docker is still starting or deferred
(gate-closed) — including when a status request is still unanswered at
the deadline. No request runs more than a fraction of a second past the
deadline. timeout: 0 waits without a deadline.
Parameters:
optionsDockerWaitOptions = {}
Returns:
Promise<DockerStatus>
DockerOwner
Section titled “DockerOwner”type DockerOwner = 'none' | 'daemon' | 'entrypoint' | 'unknown'DockerState
Section titled “DockerState”type DockerState = 'not_present' | 'disabled' | 'unmanaged' | 'deferred' | 'starting' | 'ready' | 'failed' | 'unsupported' | 'unknown'DockerStatus
Section titled “DockerStatus”Properties:
ownerDockerOwnerrawOwnerstringprocessId?string | nullreason?string | nullstateDockerStaterawStatestring
DockerWaitOptions
Section titled “DockerWaitOptions”Properties:
timeout?number - Wait budget in milliseconds. Default 60 000.0waits without a deadline — avoid it for sandboxes whose Docker can staydeferred.