- Add API support for SCTP port mapping - Add canonical import path - Add `REMOVE` and `ORPHANED` to TaskState - Fix TLS from environment variables in client - Introduce NewClientWithOpts func to build custom client easily - Wrap response errors for container copy methodsto fix error detection using `IsErrNotFound` and `IsErrNotImplemented` for `ContainerStatPath`, `CopyFromContainer`, and `CopyToContainer` methods. - Produce errors when empty ids are passed into inspect calls Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
18 lines
482 B
Go
18 lines
482 B
Go
package client // import "github.com/docker/docker/client"
|
|
|
|
import (
|
|
"net/url"
|
|
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
// ContainerKill terminates the container process but does not remove the container from the docker host.
|
|
func (cli *Client) ContainerKill(ctx context.Context, containerID, signal string) error {
|
|
query := url.Values{}
|
|
query.Set("signal", signal)
|
|
|
|
resp, err := cli.post(ctx, "/containers/"+containerID+"/kill", query, nil, nil)
|
|
ensureReaderClosed(resp)
|
|
return err
|
|
}
|