DockerService
class DockerService()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).
DockerService.__init__
def __init__(transport: AsyncTransport) -> NoneDockerService.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.
DockerService.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
@dataclass(frozen=True)
class DockerStatus()Attributes:
ownerDockerOwnerstateDockerStateprocess_idOptional[str] = NonereasonOptional[str] = Noneraw_ownerOptional[str] = Noneraw_stateOptional[str] = None
SyncDockerService
class SyncDockerService()Read-only Docker Engine status. Nothing here starts or restarts Docker.
SyncDockerService.__init__
def __init__(impl: DockerService, bridge: SyncBridge) -> NoneSyncDockerService.status
def status() -> DockerStatusReturn the current Docker Engine status for this boot, answered immediately.
SyncDockerService.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.
DockerState
DockerState = Literal['ready', 'starting', 'failed', 'not_present', 'disabled', 'unmanaged', 'deferred', 'unsupported', 'unknown']DockerOwner
DockerOwner = Literal['daemon', 'entrypoint', 'none', 'unknown']