Merge pull request #15168 from Microsoft/10662-daemonconfiglocation

Windows: [TP3] Move daemon config directory
This commit is contained in:
Alexander Morozov 2015-07-30 12:56:52 -07:00
commit 75c082c4b2
3 changed files with 10 additions and 9 deletions

View file

@ -8,7 +8,6 @@ import (
"io" "io"
"os" "os"
"path/filepath" "path/filepath"
"runtime"
"strings" "strings"
"time" "time"
@ -319,11 +318,3 @@ func shutdownDaemon(d *daemon.Daemon, timeout time.Duration) {
logrus.Error("Force shutdown daemon") logrus.Error("Force shutdown daemon")
} }
} }
func getDaemonConfDir() string {
// TODO: update for Windows daemon
if runtime.GOOS == "windows" {
return cliconfig.ConfigDir()
}
return "/etc/docker"
}

View file

@ -44,3 +44,7 @@ func setDefaultUmask() error {
return nil return nil
} }
func getDaemonConfDir() string {
return "/etc/docker"
}

View file

@ -3,6 +3,8 @@
package main package main
import ( import (
"os"
apiserver "github.com/docker/docker/api/server" apiserver "github.com/docker/docker/api/server"
"github.com/docker/docker/daemon" "github.com/docker/docker/daemon"
) )
@ -21,3 +23,7 @@ func currentUserIsOwner(f string) bool {
func setDefaultUmask() error { func setDefaultUmask() error {
return nil return nil
} }
func getDaemonConfDir() string {
return os.Getenv("PROGRAMDATA") + `\docker\config`
}