$ docker image inspect image_name|id
The json data out put from this command output,it include
Config key. Usually their values are the same when commit a image from a container, but not when build from Dockerfile.
Who knows what difference they have in their use?
Config contains the image’s information. As far as I can tell,
ContainerConfig contains the details of the container that was used to build the last layer of the image - it corresponds to the last line in the image’s Dockerfile.
I found that the new container (
docker run\create) will apply the data of
Does this mean that
ContainerConfig just show the last layer information (commit container or last instruction in Dockerfile) in the image and it no use for new containers?
Although the values of
Config are mostly the same, maybe
Config is made from
ContainerConfig is of no use for new containers.
It makes sense that the values are mosly the same, as each stage in a build inherits the metadata from the previous stage. One value which is practically guaranteed to be different is the