mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-01 14:21:07 +00:00
75513575be
* store dependency's in git * since we vendor ... rm tech-depts * aad make target 'vendor' to update vendor folder (manual task)
24 lines
659 B
Go
24 lines
659 B
Go
package docker // import "docker.io/go-docker"
|
|
|
|
import (
|
|
"net/url"
|
|
|
|
"golang.org/x/net/context"
|
|
|
|
"docker.io/go-docker/api/types"
|
|
)
|
|
|
|
// ContainerStart sends a request to the docker daemon to start a container.
|
|
func (cli *Client) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error {
|
|
query := url.Values{}
|
|
if len(options.CheckpointID) != 0 {
|
|
query.Set("checkpoint", options.CheckpointID)
|
|
}
|
|
if len(options.CheckpointDir) != 0 {
|
|
query.Set("checkpoint-dir", options.CheckpointDir)
|
|
}
|
|
|
|
resp, err := cli.post(ctx, "/containers/"+containerID+"/start", query, nil, nil)
|
|
ensureReaderClosed(resp)
|
|
return err
|
|
}
|