diff --git a/cmd/dockerd/daemon.go b/cmd/dockerd/daemon.go index 6095701a52..07f876c3e5 100644 --- a/cmd/dockerd/daemon.go +++ b/cmd/dockerd/daemon.go @@ -99,6 +99,8 @@ func (cli *DaemonCli) start(opts *daemonOptions) (err error) { FullTimestamp: true, }) + system.InitLCOW(cli.Config.Experimental) + if err := setDefaultUmask(); err != nil { return fmt.Errorf("Failed to set umask: %v", err) } diff --git a/pkg/system/init_unix.go b/pkg/system/init_unix.go new file mode 100644 index 0000000000..a219895e6d --- /dev/null +++ b/pkg/system/init_unix.go @@ -0,0 +1,7 @@ +// +build !windows + +package system + +// InitLCOW does nothing since LCOW is a windows only feature +func InitLCOW(experimental bool) { +} diff --git a/pkg/system/init_windows.go b/pkg/system/init_windows.go index 019c66441c..e751837267 100644 --- a/pkg/system/init_windows.go +++ b/pkg/system/init_windows.go @@ -8,9 +8,10 @@ import "os" // on build number. @jhowardmsft var lcowSupported = false -func init() { +// InitLCOW sets whether LCOW is supported or not +func InitLCOW(experimental bool) { // LCOW initialization - if os.Getenv("LCOW_SUPPORTED") != "" { + if experimental && os.Getenv("LCOW_SUPPORTED") != "" { lcowSupported = true }