Docker architecture: CLI, daemon, API and registries
Select an icon to see what it is.
Step 2 of 6
The API is plain HTTP on a socket
By default the CLI and dockerd talk over a unix socket, /var/run/docker.sock, using the Docker Engine REST API. Any HTTP client can call it, for example curl with --unix-socket. The version in the path, such as /v1.45, is the API version.
$ curl --unix-socket /var/run/docker.sock http://localhost/v1.45/containers/jsonHTTP over /var/run/docker.sock
GET /v1.45/containers/json HTTP/1.1Host: localhost