Member-only story

Docker image CLI commands (Inspect, Pruning, export/import)

Park Sehun
3 min readAug 9, 2023

Let’s talk about the Docker image command

Inspecting Docker Images

The docker image contains the creation date, command, env variables, architecture, OS, size, etc. as well as

  • Id: The unique identifier of the image.
  • Created: The date and time when the image was created.
  • Size: The size of the image in bytes.
  • Config: Configuration details such as the entrypoint, command, environment variables, exposed ports, and more.
  • Layers: The list of layers that make up the image, including their corresponding layer IDs and sizes.
  • Labels: Custom metadata labels associated with the image.
docker image inspect <name>

If you want to filter

You can use the Linux command ‘grep’

However, while there is looking good value if the content is in line, you can’t see anything if the content is in line below. Then you can use the ‘format’ option.

Now you can see only the values that you want to check. You also can search for inherited value underneath the parent’s category.

Pruning Docker Images

No responses yet

Write a response