Inspecting containers
Containers are runtime instances of an image and have a lot of associated data that characterizes their behavior. To get more information about a specific container, we can use the inspect
command. As usual, we have to provide either the container ID or name to identify the container of which we want to obtain the data. So, let's inspect our sample container:
$ docker container inspect quotes
The response is a big JSON object full of details. It looks similar to this:
[ { "Id": "c5c1c68c87...", "Created": "2017-12-30T11:55:51.223271182Z", "Path": "/bin/sh", "Args": [ "-c", "while :; do wget -qO- https://talaikis.com/api/quotes/random; printf '\n'; sleep 5; done" ], "State": { "Status": "running", "Running": true, ... }, "Image": "sha256:e21c333399e0...", ... "Mounts": [], "Config": { "Hostname": "c5c1c68c87dd", "Domainname...