Пример #1
0
func newDockerRunner(c *cli.Context) (*runner.Runner, error) {
	client, err := newDockerClient(c)
	if err != nil {
		return nil, err
	}
	return runner.NewRunner(client), nil
}
Пример #2
0
func newRunner(o DockerOptions) (*runner.Runner, error) {
	if o.Socket == "" {
		return nil, nil
	}

	c, err := dockerutil.NewClient(o.Auth, o.Socket, o.CertPath)
	if err != nil {
		return nil, err
	}

	return runner.NewRunner(c), nil
}