Fix issue EXPOSE override CMD within builder

Upstream-commit: eaa2183d77435bd5d65f36287e96a341696cb79c
Component: engine
This commit is contained in:
Guillaume J. Charmes
2013-06-06 15:48:12 -07:00
parent 6bac392c45
commit 6e022d99e9

View File

@ -288,7 +288,9 @@ func (b *buildFile) commit(id string, autoCmd []string, comment string) error {
}
b.config.Image = b.image
if id == "" {
cmd := b.config.Cmd
b.config.Cmd = []string{"/bin/sh", "-c", "#(nop) " + comment}
defer func(cmd []string) { b.config.Cmd = cmd }(cmd)
if cache, err := b.srv.ImageGetCached(b.image, b.config); err != nil {
return err