Expand description
The Docker-compatible engines this computer has: each CLI context with an engine behind it,
whether its daemon answers, which one the CLI uses, and pointing the CLI at another
(docker context use). Every call is the Docker CLI’s, through the Context’s runner.
A daemon that gives no answer says why (NoAnswer): no CLI, refused to this account (its
socket’s or named pipe’s permission: joining a group helps, starting the engine doesn’t),
stopped, or an empty answer. An installed engine that doesn’t answer is started as its user
would start it (start_engine).
Structs§
- Engine
Status - One Docker-compatible engine found on this computer: the CLI context that reaches it, whether its daemon answers, and whether it is the CLI’s current context.
Enums§
- Context
Error - Why an engine’s context couldn’t be found or used.
- Engine
- A Docker-compatible engine.
- NoAnswer
- Why the Docker daemon gave no answer.
- Start
Failed - Why an engine wasn’t started.
Constants§
- AGREEMENT_
GRACE - How long Docker Desktop, opened, is given to show its window before its agreement, not
accepted yet, is said to wait for its user (
StartFailed::AgreementNotAccepted). - DESKTOP_
BACKEND_ GRACE - How long Docker Desktop, opened, is given to start its backend (its socket listening:
crate::host::Devices::docker_desktop_socket) before it is taken to wait for its user. - START_
POLL - How long between two of those asks.
- START_
TRIES - How many times a started engine is asked whether it answers,
START_POLLapart: three minutes in all.
Functions§
- agreement_
accepted - Whether this computer’s Docker Desktop user has accepted its agreement, from its settings
(
crate::host::Devices::docker_desktop_settings):Nonewhen Docker Desktop has written no settings yet (never started) or they don’t read as JSON. - daemon_
info docker info --format <field>({{.ServerVersion}}, say), of the daemoncontextreaches (the current one whenNone): the daemon answers this account. Docker 26 and older (Debian’sdocker.io) exit 0 fromdocker infowhen the daemon doesn’t answer, saying so on standard error alone with an empty line on standard output: an empty answer is asked again ofdocker version, which fails with the reason (not running, or refused to this account).- daemon_
os - The current daemon’s operating system line (
docker info’s{{.OperatingSystem}}): it answers this account. - engine_
context - The Docker context behind
engineon this computer, to run on it (docker --context <name>). - engine_
in_ use - The engine running, from its daemon’s operating system line (
daemon_os) and the CLI’s current context. - engines
- Every engine this computer has, one per context that names one or answers: probed one by one
with
docker --context <c> info, given as long as any probe (Context::probe_timeout, asdaemon_os): a stopped engine fails fast, and one waking up (Docker Desktop’s Resource Saver, a cold CLI on Windows) answers within it. A context that answers names its engine from the daemon’s operating system too, sodefaulton a Mac reads as the desktop app behind it; one that doesn’t is known by its name alone. Two contexts to one engine keep the first (the current one first of all). None when the contexts can’t be listed (no Docker CLI). - running_
of - The engines whose daemon answers.
- says_
denied - Whether
said(a faileddockercall’s) says the daemon refused this account: the socket’s refusal on unix (permission denied … docker.sock,… the docker API,… the Docker daemon socket), or the named pipe’s on Windows (open //./pipe/dockerDesktopLinuxEngine: Access is denied.). - start_
engine - Starts
engine(start_steps, each line its steps print handed toon_line), points the Docker CLI at it once its context appears, and waits until its daemon answers this account. An engine that runs already (its own context answers) is only pointed at: no step runs. - start_
steps - The steps that start
engineonos, root steps elevated byelevation(Linux):Nonewhen it isn’t one a setup starts there (its user starts it). - use_
engine - Points the Docker CLI at
engine(docker context use), as its user would in a terminal.