github.com/rumpl/bof@v23.0.0-rc.2+incompatible/daemon/config/config_windows.go (about)

     1  package config // import "github.com/docker/docker/daemon/config"
     2  
     3  import (
     4  	"os"
     5  	"path/filepath"
     6  
     7  	"github.com/docker/docker/api/types"
     8  )
     9  
    10  const (
    11  	// This is used by the `default-runtime` flag in dockerd as the default value.
    12  	// On windows we'd prefer to keep this empty so the value is auto-detected based on other options.
    13  	StockRuntimeName = ""
    14  )
    15  
    16  // BridgeConfig stores all the bridge driver specific
    17  // configuration.
    18  type BridgeConfig struct {
    19  	commonBridgeConfig
    20  }
    21  
    22  // Config defines the configuration of a docker daemon.
    23  // It includes json tags to deserialize configuration from a file
    24  // using the same names that the flags in the command line uses.
    25  type Config struct {
    26  	CommonConfig
    27  
    28  	// Fields below here are platform specific. (There are none presently
    29  	// for the Windows daemon.)
    30  }
    31  
    32  // GetRuntime returns the runtime path and arguments for a given
    33  // runtime name
    34  func (conf *Config) GetRuntime(name string) *types.Runtime {
    35  	return nil
    36  }
    37  
    38  // GetAllRuntimes returns a copy of the runtimes map
    39  func (conf *Config) GetAllRuntimes() map[string]types.Runtime {
    40  	return map[string]types.Runtime{}
    41  }
    42  
    43  // GetExecRoot returns the user configured Exec-root
    44  func (conf *Config) GetExecRoot() string {
    45  	return ""
    46  }
    47  
    48  // GetInitPath returns the configured docker-init path
    49  func (conf *Config) GetInitPath() string {
    50  	return ""
    51  }
    52  
    53  // IsSwarmCompatible defines if swarm mode can be enabled in this config
    54  func (conf *Config) IsSwarmCompatible() error {
    55  	return nil
    56  }
    57  
    58  // ValidatePlatformConfig checks if any platform-specific configuration settings are invalid.
    59  func (conf *Config) ValidatePlatformConfig() error {
    60  	return nil
    61  }
    62  
    63  // IsRootless returns conf.Rootless on Linux but false on Windows
    64  func (conf *Config) IsRootless() bool {
    65  	return false
    66  }
    67  
    68  func setPlatformDefaults(cfg *Config) error {
    69  	cfg.Root = filepath.Join(os.Getenv("programdata"), "docker")
    70  	cfg.ExecRoot = filepath.Join(os.Getenv("programdata"), "docker", "exec-root")
    71  	cfg.Pidfile = filepath.Join(cfg.Root, "docker.pid")
    72  	return nil
    73  }