moby/builder
Yong Tang e2b04a7818 Fix image's CMD after WORKDIR in Dockerfile
This fix tries to fix 29667 where image's `CMD` is modified
after `WORKDIR` in Dockerfile.

The value of `b.runConfig.Cmd` was modified in the processing
of `WORKDIR`, in order to fix 28902. However, the same
`b.runConfig.Cmd` is passed to `commit()`.

This fix restored the `b.runConfig.Cmd` before `commit()`
the image for `WORKDIR`.

A test has been added.

This fix fixes 29667.

This fix is related to 28902, 28909, 28514.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 0836023847)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:42:42 +01:00
..
dockerfile Fix image's CMD after WORKDIR in Dockerfile 2017-01-04 12:42:42 +01:00
dockerignore add defer file.Close to avoid potential fd leak 2016-08-10 08:36:09 +08:00
builder.go Remove hostname validation as it seems to break users 2016-12-05 00:40:19 -08:00
context.go Fix directory walker error checking 2016-05-26 14:59:38 -07:00
context_test.go Builder unit tests refactoring 2016-05-03 19:00:35 +02:00
context_unix.go Move validateContextDirectory to builder package. 2016-02-09 22:19:09 +01:00
context_windows.go Move validateContextDirectory to builder package. 2016-02-09 22:19:09 +01:00
dockerignore.go add defer file.Close to avoid potential fd leak 2016-08-10 08:36:09 +08:00
dockerignore_test.go Builder unit tests refactoring 2016-05-03 19:00:35 +02:00
git.go utils: move git functions to pkg/gitutils 2015-12-14 14:59:52 +01:00
remote.go pkg/archive: remove unnecessary Archive and Reader type 2016-10-20 19:31:24 -07:00
remote_test.go pkg/archive: remove unnecessary Archive and Reader type 2016-10-20 19:31:24 -07:00
tarsum.go Windows: Fix builder cache bug 2016-10-27 12:27:30 -07:00
tarsum_test.go fix using wrong function name for MakeTarSumContext 2016-11-08 17:16:13 +08:00
utils_test.go Builder unit tests refactoring 2016-05-03 19:00:35 +02:00