What is different of Config and ContainerConfig of docker inspect? : <p>I use <code>docker inspect</code> to get the image information. I find there are <code>Config</code> and <code>ContainerConfig</code> in the output, and most value are the same, except the <code>CMD</code>. </p>

<p>In practice, the <code>Config</code> take effect. For I must add cmd in the run command.
<code>
$ docker run -it debian bash
</code></p>

<p>I wonder what is the difference of the two items?</p>

<pre><code>$ docker inspect debian
[
{
    "Id": "7abab0fd74f97b6b398a1aca68735c5be153d49922952f67e8696a2225e1d8e1",
    ......
    "ContainerConfig": {
        "Hostname": "e5c68db50333",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": null,
        "Cmd": [
            "/bin/sh",
            "-c",
            "#(nop) CMD [\"/bin/bash\"]"
        ],
        "Image": "d8bd0657b25f17eef81a3d52b53da5bda4de0cf5cca3dcafec277634ae4b38fb",
        "Volumes": null,
        "WorkingDir": "",
        "Entrypoint": null,
        "OnBuild": null,
        "Labels": {}
    },
    "Config": {
        "Hostname": "e5c68db50333",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": null,
        "Cmd": [
            "/bin/bash"
        ],
        "Image": "d8bd0657b25f17eef81a3d52b53da5bda4de0cf5cca3dcafec277634ae4b38fb",
        "Volumes": null,
        "WorkingDir": "",
        "Entrypoint": null,
        "OnBuild": null,
        "Labels": {}
    },
    ......
}
]
</code></pre>
