Interview Prep/Docker/Runtime Stack, OCI & Registries

What is the Docker Engine API and how can you use it without the CLI?

IntermediateConceptRuntime Stack, OCI & Registries
Answer

A versioned REST API served on the Unix socket. You can call it with curl:

curl --unix-socket /var/run/docker.sock http://localhost/v1.45/containers/json

SDKs exist for Go, Python (docker package) and others. docker events streams the same event feed.

All Docker questions Roadmap: Docker & containers

More on Runtime Stack, OCI & Registries