DockerService
Section titled “DockerService”class DockerService()Read-only Docker Engine status. Nothing here starts or restarts Docker.
DockerService.__init__
Section titled “DockerService.__init__”def __init__(impl: AsyncDockerService, bridge: SyncBridge) -> NoneDockerService.status
Section titled “DockerService.status”def status() -> DockerStatusReturn the current Docker Engine status for this boot, answered immediately.
DockerService.wait_until_ready
Section titled “DockerService.wait_until_ready”def wait_until_ready(*, timeout: float = DOCKER_WAIT_DEFAULT_TIMEOUT_SECONDS) -> DockerStatusPoll the Docker status until it is ready and return that status.
AsyncDockerService
Section titled “AsyncDockerService”class AsyncDockerService()Read-only Docker Engine status. Nothing here starts or restarts Docker.
A sandbox whose daemon predates this feature answers status and
wait_until_ready with a NotFoundError (404).
AsyncDockerService.__init__
Section titled “AsyncDockerService.__init__”def __init__(transport: AsyncTransport) -> NoneAsyncDockerService.status
Section titled “AsyncDockerService.status”async def status() -> DockerStatusReturn the current Docker Engine status for this boot, answered immediately.
Raises NotFoundError (404) against an older daemon without the route.
AsyncDockerService.wait_until_ready
Section titled “AsyncDockerService.wait_until_ready”async def wait_until_ready(*, timeout: float = DOCKER_WAIT_DEFAULT_TIMEOUT_SECONDS) -> DockerStatusPoll the Docker status until it is ready and return that status.
timeout is the wait budget in seconds (default 60); 0 waits
without a deadline — avoid it for sandboxes whose Docker can stay
deferred. Each poll asks the daemon to hold for up to one second
while Docker is starting; answers that come back sooner are spaced
0.5 s apart.
Raises 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.
DockerStatus
Section titled “DockerStatus”@dataclass(frozen=True)class DockerStatus()Attributes:
ownerDockerOwnerstateDockerStateprocess_idOptional[str] = NonereasonOptional[str] = Noneraw_ownerOptional[str] = Noneraw_stateOptional[str] = None
DockerState
Section titled “DockerState”DockerState = Literal['ready', 'starting', 'failed', 'not_present', 'disabled', 'unmanaged', 'deferred', 'unsupported', 'unknown']DockerOwner
Section titled “DockerOwner”DockerOwner = Literal['daemon', 'entrypoint', 'none', 'unknown']