mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Windows: Move daemon config directory
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
		
							parent
							
								
									868f85b271
								
							
						
					
					
						commit
						9ed4400baf
					
				
					 3 changed files with 10 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -8,7 +8,6 @@ import (
 | 
			
		|||
	"io"
 | 
			
		||||
	"os"
 | 
			
		||||
	"path/filepath"
 | 
			
		||||
	"runtime"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -319,11 +318,3 @@ func shutdownDaemon(d *daemon.Daemon, timeout time.Duration) {
 | 
			
		|||
		logrus.Error("Force shutdown daemon")
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func getDaemonConfDir() string {
 | 
			
		||||
	// TODO: update for Windows daemon
 | 
			
		||||
	if runtime.GOOS == "windows" {
 | 
			
		||||
		return cliconfig.ConfigDir()
 | 
			
		||||
	}
 | 
			
		||||
	return "/etc/docker"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,3 +44,7 @@ func setDefaultUmask() error {
 | 
			
		|||
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func getDaemonConfDir() string {
 | 
			
		||||
	return "/etc/docker"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,8 @@
 | 
			
		|||
package main
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"os"
 | 
			
		||||
 | 
			
		||||
	apiserver "github.com/docker/docker/api/server"
 | 
			
		||||
	"github.com/docker/docker/daemon"
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			@ -21,3 +23,7 @@ func currentUserIsOwner(f string) bool {
 | 
			
		|||
func setDefaultUmask() error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func getDaemonConfDir() string {
 | 
			
		||||
	return os.Getenv("PROGRAMDATA") + `\docker\config`
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue