Ad space (banner)
AD

Got the fundamentals? A structured Docker course is a fast way to level up.

Find Docker courses on Udemy

Affiliate link. Costs you nothing extra.

🐳Docker Lessons
Lesson 22 / 45

Inspecting Details with docker inspect

When you need the full configuration of a container or image, use docker inspect. It prints everything Docker knows about it, as JSON.

The syntax is docker inspect container-or-image.

Running docker inspect web shows the container's ID, image, state, network settings, mounts, environment variables and more.

A common stumble is being overwhelmed by the sheer volume of JSON. In practice you filter it with --format or pipe it through a tool like jq.

In real work, it is how you answer precise questions: which IP does this container have, which volume is actually mounted where.

Docker
Try it (type this into the pseudo terminal)
docker inspect web

🧑‍💻 You can type this command into the Docker pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)