✦ For everyone, free.

Practical knowledge for real and everyday life

Home

19.3.3.1 Version Client Output

A focused guide to Version Client Output, connecting core concepts with practical Docker and container operations.

The Client section in docker version output describes the Docker CLI binary installed on the machine where the command is run. It is produced entirely from local binary metadata and does not require a connection to the Docker daemon, which means it appears in the output even when the daemon is unavailable or unreachable.

Client Output Structure

docker version

The Client section appears first in the output:

Client: Docker Engine - Community
 Version:           25.0.3
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        4debf41
 Built:             Tue Feb  6 21:12:32 2024
 OS/Arch:           linux/amd64
 Context:           default

Fields

Product Line Label

The header line Client: Docker Engine - Community identifies the product variant of the Docker client. Common values:

  • Docker Engine - Community: The open-source Docker Engine available from Docker's official repositories.
  • Docker Desktop: The Docker Desktop application for macOS and Windows, which bundles the CLI with a virtual machine and GUI.
  • Mirantis Container Runtime: The enterprise-focused Docker distribution previously known as Docker Enterprise Edition.
Version

The semantic version number of the Docker CLI binary. This number increases with each Docker release and follows the format MAJOR.MINOR.PATCH. For most purposes, this is the number reported when users say they are running a specific version of Docker.

API version

The highest Docker API version the client supports. When the client sends a request to the Docker daemon, it uses this API version unless the daemon supports a lower maximum, in which case both sides negotiate down to the lower value.

The API version is not the same as the CLI version. The API version is a protocol version used for communication between the client and daemon. Multiple CLI versions may share the same API version, and an increase in the API version number indicates new API capabilities were added.

Go version

The version of the Go programming language compiler that was used to build the Docker CLI binary. This is relevant for security audits and compatibility analysis. If a Go vulnerability is discovered, knowing which Go version was used to build a binary indicates whether the binary needs to be updated.

Git commit

The short (7-character) SHA hash of the commit in the Docker source repository from which this client binary was built. When reporting bugs or checking changelogs, the full commit context can be found using this hash against the Docker GitHub repository.

Built

The timestamp of when the client binary was compiled. This is set at build time and embedded in the binary. It corresponds to the official release date for released binaries.

OS/Arch

The operating system and CPU architecture for which the CLI binary was compiled:

  • linux/amd64: Linux on 64-bit Intel/AMD processors. The most common for server environments.
  • linux/arm64: Linux on 64-bit ARM processors (AWS Graviton, Raspberry Pi 4, Apple Silicon via Rosetta or native Linux).
  • linux/arm/v7: Linux on 32-bit ARM (Raspberry Pi 3 and earlier).
  • darwin/amd64: macOS on Intel processors.
  • darwin/arm64: macOS on Apple Silicon (M1/M2/M3).
  • windows/amd64: Windows on 64-bit Intel/AMD.

The OS/Arch of the client does not need to match the OS/Arch of the server. A darwin/arm64 client on a Mac can communicate with a linux/amd64 daemon running in Docker Desktop's Linux virtual machine, or with a remote linux/amd64 host.

Context

The Docker context in use at the time the command was run. The context determines which Docker daemon the client connects to.

  • default: The default context, which connects to the local Docker daemon via the standard socket (/var/run/docker.sock on Linux, the named pipe on Windows).
  • Named contexts (e.g., remote-server, desktop-linux): User-created contexts that point to remote daemons or Docker Desktop virtual machines. These are managed with docker context ls, docker context create, and docker context use.

Contexts are local to the machine running the CLI and stored in the Docker client configuration (typically ~/.docker/contexts/).

Extracting Client Fields

The --format flag with Go templates extracts individual fields from the client output:

docker version --format "{{.Client.Version}}"
docker version --format "{{.Client.APIVersion}}"
docker version --format "{{.Client.Os}}/{{.Client.Arch}}"
docker version --format "{{.Client.GoVersion}}"
docker version --format "{{.Client.GitCommit}}"

These are useful in shell scripts that need to check the installed CLI version before proceeding with version-dependent operations.

Client Output Without a Running Daemon

The Client section is fully populated even when the Docker daemon is not running. This distinguishes a missing daemon from a missing or broken client:

Client: Docker Engine - Community
 Version:           25.0.3
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        4debf41
 Built:             Tue Feb  6 21:12:32 2024
 OS/Arch:           linux/amd64
 Context:           default

Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running?

The client information is intact; only the Server section is missing, indicating the connectivity issue is with the daemon, not the CLI installation itself.