- List local images
- Examine image history
- Inspect detailed metadata
- Filter output with JSONPath
Table of Contents
- Prerequisites
- Listing Local Images
- Viewing Image History
- Inspecting Image Metadata
- Filtering with JSONPath
- References
Prerequisites
Ensure you have Docker installed and running. Check your version with
For full installation steps, visit the Docker Docs.
docker version.For full installation steps, visit the Docker Docs.
Listing Local Images
To see all images stored on your host machine, use:Viewing Image History
Examining an image’s history reveals each layer and the command that created it. This is especially valuable if the Dockerfile isn’t available.Inspecting Image Metadata
Theinspect command returns comprehensive image metadata in JSON format, including environment variables, exposed ports, volumes, and more.
Inspecting very large images may output extensive JSON. Use filtering (see next section) or redirect output to a file:
Filtering with JSONPath
Docker’sinspect supports the -f flag with JSONPath templates to extract specific fields.