mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Allow multiple syntaxes for CMD
This commit is contained in:
parent
b06784b0dd
commit
13e687e579
1 changed files with 6 additions and 1 deletions
|
@ -132,7 +132,12 @@ func (b builderClient) CmdEnv(args string) error {
|
|||
|
||||
func (b builderClient) CmdCmd(args string) error {
|
||||
b.needCommit = true
|
||||
b.config.Cmd = []string{"/bin/sh", "-c", args}
|
||||
var cmd []string
|
||||
if err := json.Unmarshal([]byte(args), &cmd); err != nil {
|
||||
b.config.Cmd = []string{"/bin/sh", "-c", args}
|
||||
} else {
|
||||
b.config.Cmd = cmd
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue