Interview Prep/Docker/Runtime Stack, OCI & Registries

What does `docker inspect` return and how do you extract fields?

BeginnerConceptRuntime Stack, OCI & Registries
Answer

A JSON document with the object's full config and state. Use Go templates with -f, or pipe to jq.

docker inspect -f '{{.State.Health.Status}}' web
docker inspect web | jq '.[0].HostConfig.RestartPolicy'
All Docker questions Roadmap: Docker & containers

More on Runtime Stack, OCI & Registries