What is different of Config and ContainerConfig of docker inspect?

As mentioned in issue 18880, regarding ContainerConfig:

What you’re seeing there is related to the history of how the image was created.
Try running docker history ... on your image and you’ll see the complete history.
Docker will place the Dockerfile commands into the CMD section as a way of keeping track of how that layer/container was created.
Its really only used for cache-lookup purposes (internal docker processing) and not meant to be used by the user.

It is also visible in image/image.go as:

// ContainerConfig is the configuration of the container that is committed into the image
ContainerConfig container.Config `json:"container_config,omitempty"`

For instance, issue 17780 illustrates an empty ContainerConfig:

The ContainerConfig of an image is the container the image was generated from.
In the case of your image, it wasn’t generated from a container, but from running docker import.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)