Make sure to have a command to execute upon commit

Upstream-commit: b51303cddce2cbb22fc3ee0de9d9125bec2f029a
Component: engine
This commit is contained in:
Guillaume J. Charmes
2013-05-20 13:50:50 -07:00
parent 1215d8cad2
commit 73e1ea3706

View File

@ -134,6 +134,10 @@ func (b *BuilderClient) CmdInsert(args string) error {
}
func (b *BuilderClient) commit() error {
if b.config.Cmd == nil || len(b.config.Cmd) < 1 {
b.config.Cmd = []string{"echo"}
}
body, _, err := b.cli.call("POST", "/containers/create", b.config)
if err != nil {
return err