Sobes.tech
Junior — Middle

How can you get details about a Docker image?

sobes.tech AI

Answer from AI

To get detailed information about a Docker image, you can use the command:

docker image inspect <image_name_or_id>

This command outputs a JSON with the image's metadata: its configuration, layers, environment variables, startup commands, and other details.

Another useful command is:

docker history <image_name_or_id>

which shows the image's layer history with the commands that created them.

Example:

docker image inspect python:3.9-slim