November 2018
Beginner
230 pages
6h 4m
English
When you run a container, there is a lot of metadata that gets associated with the container. There are many times that you will want to review that metadata. The command for doing that is:
# using the new syntax# Usage: docker container inspect [OPTIONS] CONTAINER [CONTAINER...]docker container inspect web-server# using the old syntaxdocker inspect web-server
As mentioned, this command returns a lot of data. You may only be interested in a subset of the metadata. You can use the --format parameter to narrow the data returned. Check out these examples:
# if you want to see the state of a container you can use this commanddocker container inspect --format '{{json .State}}' web-server1 ...Read now
Unlock full access