Forrest logo
back to the docker tool

docker:tldr:50232

docker: Show help.
$ docker inspect
try on your machine

The "docker inspect" command is used to fetch detailed information about one or more Docker objects. This command retrieves metadata about the specified objects, including their configuration, networking, and storage details.

The basic syntax of the "docker inspect" command is as follows:

docker inspect [OPTIONS] OBJECT [OBJECT...]

The "OBJECT" can be the ID or name of a Docker container, image, volume, network, or other related entity. It can be a single object or multiple objects separated by spaces. If no object is provided, the command will fail.

Some commonly used options with the "docker inspect" command are:

  • --format: Specifies the output format of the command. You can provide a Go template to format the output according to your requirements.
  • --type: Filters the objects based on their type (e.g., container, image, volume, network).
  • --size: Shows the size-related information for the objects (e.g., size of the container's filesystem).

When the command is executed, it will return a detailed JSON representation of the specified object(s). The output contains a wide range of information, including the object's ID, name, labels, network settings, resource usage, and more.

Overall, "docker inspect" is a powerful command that helps you gather detailed information about Docker objects, allowing you to troubleshoot issues, understand their configuration, or retrieve specific details for automation purposes.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the docker tool