docker/docker — pull request #8332 by dqminh (2014-10-01 09:56:55+00:00)
Title: Add support for 'commit --change'

The spec for `commit --change` can be found at https://github.com/docker/docker/pull/5105
This PR changes the original pull request to use new builder for generating `runconfig.Config`

Supported Dockerfile instructions for `--change` are:
```
- ENTRYPOINT
- CMD
- USER
- WORKDIR
- ENV
- VOLUME
- EXPOSE
- ONBUILD
```

Example command:
```
> docker run --name test busybox true
> docker commit --change "EXPOSE 8080 3000" --change "ENV DEBUG true" --change "VOLUME /test1 /test2" --change "WORKDIR /test1" test test-commit
> docker inspect test-commit
"Config": {
"Env": [
"DEBUG=true",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"ExposedPorts": {
"3000/tcp": {},
"8080/tcp": {}
},
"Volumes": {
"/test1": {},
"/test2": {}
},
"WorkingDir": "/test1"
},
```