// ExecCreate creates a new exec configuration to run an exec process.
ExecCreate creates a new exec configuration to run an exec process.
// ExecCreate creates a new exec configuration to run an exec process .
func (cli *Client) ExecCreate(container string, cmd string) (string, error) {
	var response ExecResponse
	execConfig := cli.defaultExecConfig()
	execConfig.Cmd = append(execConfig.Cmd, cmd)
	resp, err := cli.post("/containers/"+container+"/exec", nil, execConfig, nil)
	if err != nil {
		return response.ID, err
	}
	err = json.NewDecoder(resp.body).Decode(&response)
	return response.ID, err
}
func ( cli * Client ) ExecCreate ( container string , cmd string ) ( string , error ) { var response ExecResponse execConfig := cli . defaultExecConfig ( ) execConfig . Cmd = append ( execConfig . Cmd , cmd ) resp , err := cli . post ( " " + container + " " , nil , execConfig , nil ) if err != nil { return response . ID , err } err = json . NewDecoder ( resp . body ) . Decode ( & response ) return response . ID , err }
ExecCreate creates a new exec configuration to run an exec process.
ExecCreate creates a new exec configuration to run an exec process .