mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-04 04:31:28 +00:00
Fix exec driver flag, rename new driver to 'native'
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
+1
-1
@@ -39,7 +39,7 @@ func main() {
|
||||
flDefaultIp = flag.String([]string{"#ip", "-ip"}, "0.0.0.0", "Default IP address to use when binding container ports")
|
||||
flInterContainerComm = flag.Bool([]string{"#icc", "-icc"}, true, "Enable inter-container communication")
|
||||
flGraphDriver = flag.String([]string{"s", "-storage-driver"}, "", "Force the docker runtime to use a specific storage driver")
|
||||
flExecDriver = flag.String([]string{"e", "-exec-driver"}, "", "Force the docker runtime to use a specific exec driver")
|
||||
flExecDriver = flag.String([]string{"e", "-exec-driver"}, "native", "Force the docker runtime to use a specific exec driver")
|
||||
flHosts = opts.NewListOpts(api.ValidateHost)
|
||||
flMtu = flag.Int([]string{"#mtu", "-mtu"}, 0, "Set the containers network MTU; if no value is provided: default to the default route MTU or 1500 if no default route is available")
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package docker
|
||||
package native
|
||||
|
||||
import (
|
||||
"github.com/dotcloud/docker/pkg/cgroups"
|
||||
@@ -1,4 +1,4 @@
|
||||
package docker
|
||||
package native
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@@ -1,4 +1,4 @@
|
||||
package docker
|
||||
package native
|
||||
|
||||
import (
|
||||
"github.com/dotcloud/docker/execdriver"
|
||||
+11
-10
@@ -7,8 +7,8 @@ import (
|
||||
"github.com/dotcloud/docker/dockerversion"
|
||||
"github.com/dotcloud/docker/engine"
|
||||
"github.com/dotcloud/docker/execdriver"
|
||||
"github.com/dotcloud/docker/execdriver/docker"
|
||||
"github.com/dotcloud/docker/execdriver/lxc"
|
||||
"github.com/dotcloud/docker/execdriver/native"
|
||||
"github.com/dotcloud/docker/graphdriver"
|
||||
"github.com/dotcloud/docker/graphdriver/aufs"
|
||||
_ "github.com/dotcloud/docker/graphdriver/btrfs"
|
||||
@@ -702,17 +702,18 @@ func NewRuntimeFromDirectory(config *DaemonConfig, eng *engine.Engine) (*Runtime
|
||||
sysInitPath = localCopy
|
||||
}
|
||||
|
||||
sysInfo := sysinfo.New(false)
|
||||
var (
|
||||
ed execdriver.Driver
|
||||
sysInfo = sysinfo.New(false)
|
||||
)
|
||||
|
||||
var ed execdriver.Driver
|
||||
utils.Debugf("execDriver: provided %s", config.ExecDriver)
|
||||
if config.ExecDriver == "chroot" && false {
|
||||
// chroot is presently a noop driver https://github.com/dotcloud/docker/pull/4189#issuecomment-35330655
|
||||
ed, err = chroot.NewDriver()
|
||||
utils.Debugf("execDriver: using chroot")
|
||||
} else {
|
||||
switch config.ExecDriver {
|
||||
case "lxc":
|
||||
ed, err = lxc.NewDriver(config.Root, sysInfo.AppArmor)
|
||||
utils.Debugf("execDriver: using lxc")
|
||||
case "native":
|
||||
ed, err = native.NewDriver(config.Root)
|
||||
default:
|
||||
return nil, fmt.Errorf("unknow exec driver %s", config.ExecDriver)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"github.com/dotcloud/docker/execdriver"
|
||||
_ "github.com/dotcloud/docker/execdriver/lxc"
|
||||
_ "github.com/dotcloud/docker/execdriver/native"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
||||
Reference in New Issue
Block a user