19.3.3.3 Version API Output
A focused guide to Version API Output, connecting core concepts with practical Docker and container operations.
The API version fields in docker version output describe the protocol version used for communication between the Docker client and the Docker daemon. The Docker API is a REST-like HTTP interface; the API version number appears in every request URL and determines which endpoints, parameters, and response fields are available. The client and daemon negotiate the version to use at connection time based on what both sides support.
Where API Version Appears in the Output
docker version
Client: Docker Engine - Community
Version: 25.0.3
API version: 1.44
...
Server: Docker Engine - Community
Engine:
Version: 25.0.3
API version: 1.44 (minimum version 1.12)
...
The Client shows one API version value: its maximum supported version. The Server shows two: its maximum and its minimum.
Client API Version
The client's API version field is the highest version of the Docker API the CLI binary was built to support. When the client connects to the daemon, it sends requests with this version number. If the daemon also supports this version, all features available at that API level are accessible.
If the daemon supports a lower maximum, the client automatically negotiates down to the daemon's maximum. The DOCKER_API_VERSION environment variable overrides this automatic negotiation:
DOCKER_API_VERSION=1.40 docker version
This forces the client to use API version 1.40 regardless of what both sides support, which is useful when testing compatibility with older daemons.
Server API Version
The server's API version field shows two numbers:
1.44 (minimum version 1.12)
- Maximum version (1.44): The highest API version the daemon can handle. Clients using versions above this are rejected.
- Minimum version (1.12): The lowest API version the daemon accepts. Clients using versions below this are rejected with an incompatibility error.
The minimum version value increases over time as Docker drops support for very old client versions. As of Docker 25.x, the minimum is 1.12, meaning clients built for API versions 1.11 and below cannot communicate with this daemon.
API Version Negotiation
When a client connects to a daemon, the negotiation process determines the effective API version for the session:
The effective API version used in a session is min(client maximum, server maximum) as long as this value is greater than or equal to the server minimum. If it falls below the server minimum, the connection fails.
Compatibility rule:
API Version vs. CLI Version
The API version and the CLI version are distinct. The CLI version (e.g., 25.0.3) is the version of the docker binary. The API version (e.g., 1.44) is the protocol version for client-daemon communication. Multiple CLI versions can share the same API version, and CLI version numbers do not correspond directly to API version numbers.
Practical Impact of API Version
Each increment in API version adds new capabilities, parameters, or endpoints. Older clients using lower API versions cannot access features added in higher versions. For example:
- Filtering capabilities, new container fields, network options, and swarm commands were added progressively across API versions from 1.12 through 1.44.
- If a CLI feature requires API version 1.41 but the daemon only supports up to 1.39, that feature will be unavailable.
Extracting API Version in Scripts
docker version --format "{{.Client.APIVersion}}"
docker version --format "{{.Server.APIVersion}}"
These return just the version numbers as strings, useful for conditional logic in automation scripts that need to verify API compatibility before calling specific Docker features.