Docker inspect command is very useful to provide detailed information about any container. It provides all information related to image, volume etc. without login into container.You can find out each details you needed.
# docker inspect container (Put container's actual name or ID of the container you want to inspect)
# docker inspect ubuntu:latest (To inspect a Docker image, use the image's name or ID as an argument)
# docker inspect volume (To inspect a Docker volume, use the volume's name as an argument)
# docker inspect my_network (To inspect a Docker network, use the network's name as an argument)
You can also use output formatting to inspect docker which returns a JSON representation of the object. You can format the output using tools like jq or by using the --format option to extract specific fields or properties.
docker inspect --format='{{.Name}}' container (This command will display only the container's name)
# docker inspect container volume network (You can inspect multiple things as well)
Now if you want to save inspect output in json. You can use below command.