2015-04-27 15:20:44 -07:00
|
|
|
// +build windows
|
|
|
|
|
|
|
|
package execdrivers
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/docker/docker/daemon/execdriver"
|
|
|
|
"github.com/docker/docker/daemon/execdriver/windows"
|
|
|
|
"github.com/docker/docker/pkg/sysinfo"
|
|
|
|
)
|
|
|
|
|
2015-07-28 08:43:22 +08:00
|
|
|
// NewDriver returns a new execdriver.Driver from the given name configured with the provided options.
|
2015-05-16 11:38:19 -07:00
|
|
|
func NewDriver(name string, options []string, root, libPath, initPath string, sysInfo *sysinfo.SysInfo) (execdriver.Driver, error) {
|
2015-04-27 15:20:44 -07:00
|
|
|
switch name {
|
|
|
|
case "windows":
|
2015-05-27 13:15:14 -07:00
|
|
|
return windows.NewDriver(root, initPath, options)
|
2015-04-27 15:20:44 -07:00
|
|
|
}
|
|
|
|
return nil, fmt.Errorf("unknown exec driver %s", name)
|
|
|
|
}
|