Skip to main content

Module docker

Module docker 

Source
Expand description

Docker Engine API server: the read-only core a real docker -H tcp://… CLI needs.

The CLI’s first request on every command is HEAD /_ping; the API-Version header on the answer is what it negotiates down to, and every later request carries that version as a /v1.xx/ path prefix. NetGet serves /_ping and the version check deterministically, and raises one docker_api_request event for each read the model decides — /version, /info, /containers/json, /containers/{id}/json, /images/json, /networks, /volumes. Mutating endpoints (create, start, exec, pull, delete…) are refused with a 501 in Docker’s own {"message": …} shape without asking the model.

The model names containers, images and states; api fills everything else the Go decoder expects. See src/server/docker/CLAUDE.md.

Modules§

actions
Docker Engine API actions.
api
Routing and rendering. Public so it can be tested without a socket. Docker Engine API routing and response rendering.

Structs§

DockerConfig
Per-server configuration.
DockerServer
Docker Engine API server.

Constants§

DEFAULT_API_VERSION
API version advertised by /_ping when the api_version startup parameter is absent.
DEFAULT_ENGINE_VERSION
Engine version reported when engine_version is absent.
MAX_REQUEST_BODY_BYTES
Largest request body this server will buffer, in bytes.