Esempio n. 1
0
// TODO(random-liu): Add unit test for exec and attach functions, just like what go-dockerclient did.
func (d *kubeDockerClient) CreateExec(id string, opts dockertypes.ExecConfig) (*dockertypes.ContainerExecCreateResponse, error) {
	opts.Container = id
	resp, err := d.client.ContainerExecCreate(getDefaultContext(), opts)
	if err != nil {
		return nil, err
	}
	return &resp, nil
}