Expand description
Which container runtime this srv talks to (P11 of the container-parity work).
DOCKER_HOST decides when it is set: a unix:// socket, tcp:// or http:// (with TLS when
DOCKER_TLS_VERIFY is; without it only to this computer, because the daemon is handed the
account’s credentials), https://, or Windows’ npipe://. Anything else (ssh://) is named
as unsupported, and nothing else is tried: the person chose a runtime.
When it is not set, the sockets a runtime leaves in the usual places are tried in order and the first that answers a ping is used:
- Linux: rootless Docker (
$XDG_RUNTIME_DIR/docker.sock), rootless Podman ($XDG_RUNTIME_DIR/podman/podman.sock), Docker Desktop (~/.docker/desktop/docker.sock, and~/.docker/run/docker.sock), the system Docker (/var/run/docker.sock), the system Podman (/run/podman/podman.sock). - macOS: Docker Desktop (
~/.docker/run/docker.sock), OrbStack (~/.orbstack/run/docker.sock), Colima (~/.colima/default/docker.sock), Rancher Desktop (~/.rd/docker.sock), then the system path. - Windows: the
docker_enginenamed pipe, as before.
A socket under the user’s own directories must belong to the user: a planted socket there would see every container request, environment variables included. The system paths are root’s by convention and are not checked.
The answer is either the connection and a label for it (“Podman at unix:///…”), or a
Missing that says what was looked at and why each place failed.
Structs§
- Candidate
- One place to try.
- Connected
- The runtime in use.
- Container
Runtime Handle - Self-healing holder for the container runtime connection.
- Env
- What detection reads from the machine, so tests can hand it a folder of fake sockets.
- Missing
- Nothing answered.
- Tried
- A place that did not work, and why.
Enums§
Functions§
- candidates
- Why
DOCKER_HOSTcannot be used, or the places to try.Erris the sentence for the person. - connect
- The first place that answers a ping, connected; or what was looked at.
- docker_
host_ in_ use DOCKER_HOSTfor the runtime in use, when it is a plain unix socket or TCP address;Nonewhen none is connected yet, or the endpoint is a pipe or needs TLS files (the CLI’s own default then applies).