1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #43942 from thaJeztah/rundaemon_windows_nit

cmd/dockerd: fix some minor issues in Windows implementation
This commit is contained in:
Tianon Gravi 2022-08-11 08:30:44 -07:00 committed by GitHub
commit 3a7fda78a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -24,7 +24,7 @@ func setDefaultUmask() error {
}
func getDaemonConfDir(root string) (string, error) {
return filepath.Join(root, `\config`), nil
return filepath.Join(root, "config"), nil
}
// preNotifyReady sends a message to the host when the API is active, but before the daemon is

View file

@ -15,7 +15,7 @@ func runDaemon(opts *daemonOptions) error {
// register the service.
stop, runAsService, err := initService(daemonCli)
if err != nil {
logrus.Fatal(err)
return err
}
if stop {
@ -24,7 +24,11 @@ func runDaemon(opts *daemonOptions) error {
// Windows specific settings as these are not defaulted.
if opts.configFile == "" {
opts.configFile = filepath.Join(opts.daemonConfig.Root, `config\daemon.json`)
configDir, err := getDaemonConfDir(opts.daemonConfig.Root)
if err != nil {
return err
}
opts.configFile = filepath.Join(configDir, "daemon.json")
}
if runAsService {
// If Windows SCM manages the service - no need for PID files