|
@@ -74,7 +74,9 @@ import (
|
|
)
|
|
)
|
|
|
|
|
|
// ContainersNamespace is the name of the namespace used for users containers
|
|
// ContainersNamespace is the name of the namespace used for users containers
|
|
-const ContainersNamespace = "moby"
|
|
|
|
|
|
+const (
|
|
|
|
+ ContainersNamespace = "moby"
|
|
|
|
+)
|
|
|
|
|
|
var (
|
|
var (
|
|
errSystemNotSupported = errors.New("the Docker daemon is not supported on this platform")
|
|
errSystemNotSupported = errors.New("the Docker daemon is not supported on this platform")
|
|
@@ -775,7 +777,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
|
|
if err != nil {
|
|
if err != nil {
|
|
return nil, fmt.Errorf("Unable to get the full path to the TempDir (%s): %s", tmp, err)
|
|
return nil, fmt.Errorf("Unable to get the full path to the TempDir (%s): %s", tmp, err)
|
|
}
|
|
}
|
|
- if runtime.GOOS == "windows" {
|
|
|
|
|
|
+ if isWindows {
|
|
if _, err := os.Stat(realTmp); err != nil && os.IsNotExist(err) {
|
|
if _, err := os.Stat(realTmp); err != nil && os.IsNotExist(err) {
|
|
if err := system.MkdirAll(realTmp, 0700); err != nil {
|
|
if err := system.MkdirAll(realTmp, 0700); err != nil {
|
|
return nil, fmt.Errorf("Unable to create the TempDir (%s): %s", realTmp, err)
|
|
return nil, fmt.Errorf("Unable to create the TempDir (%s): %s", realTmp, err)
|
|
@@ -846,7 +848,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
|
|
return nil, err
|
|
return nil, err
|
|
}
|
|
}
|
|
|
|
|
|
- if runtime.GOOS == "windows" {
|
|
|
|
|
|
+ if isWindows {
|
|
if err := system.MkdirAll(filepath.Join(config.Root, "credentialspecs"), 0); err != nil {
|
|
if err := system.MkdirAll(filepath.Join(config.Root, "credentialspecs"), 0); err != nil {
|
|
return nil, err
|
|
return nil, err
|
|
}
|
|
}
|
|
@@ -860,7 +862,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
|
|
// initialization of the layerstore through driver priority order for example.
|
|
// initialization of the layerstore through driver priority order for example.
|
|
d.graphDrivers = make(map[string]string)
|
|
d.graphDrivers = make(map[string]string)
|
|
layerStores := make(map[string]layer.Store)
|
|
layerStores := make(map[string]layer.Store)
|
|
- if runtime.GOOS == "windows" {
|
|
|
|
|
|
+ if isWindows {
|
|
d.graphDrivers[runtime.GOOS] = "windowsfilter"
|
|
d.graphDrivers[runtime.GOOS] = "windowsfilter"
|
|
if system.LCOWSupported() {
|
|
if system.LCOWSupported() {
|
|
d.graphDrivers["linux"] = "lcow"
|
|
d.graphDrivers["linux"] = "lcow"
|