// ContainerExecCreate creates exec in a container
ContainerExecCreate creates exec in a container
// ContainerExecCreate creates exec in a container
func (c *Client) ContainerExecCreate(containerId string, cmd []string, tty bool) (string, error) {
	ctx, cancel := getContextWithTimeout(hyperContextTimeout)
	defer cancel()
	req := types.ExecCreateRequest{
		ContainerID: containerId,
		Command:     cmd,
		Tty:         tty,
	}
	resp, err := c.client.ExecCreate(ctx, &req)
	if err != nil {
		return "", err
	}
	return resp.ExecID, nil
}
func ( c * Client ) ContainerExecCreate ( containerId string , cmd [ ] string , tty bool ) ( string , error ) { ctx , cancel := getContextWithTimeout ( hyperContextTimeout ) defer cancel ( ) req := types . ExecCreateRequest { ContainerID : containerId , Command : cmd , Tty : tty , } resp , err := c . client . ExecCreate ( ctx , & req ) if err != nil { return " " , err } return resp . ExecID , nil }
ContainerExecCreate creates exec in a container
ContainerExecCreate creates exec in a container