github.com/gunjan5/docker@v1.8.2/daemon/config_windows.go (about)

     1  package daemon
     2  
     3  import (
     4  	"os"
     5  
     6  	flag "github.com/docker/docker/pkg/mflag"
     7  )
     8  
     9  var (
    10  	defaultPidFile = os.Getenv("programdata") + string(os.PathSeparator) + "docker.pid"
    11  	defaultGraph   = os.Getenv("programdata") + string(os.PathSeparator) + "docker"
    12  	defaultExec    = "windows"
    13  )
    14  
    15  // bridgeConfig stores all the bridge driver specific
    16  // configuration.
    17  type bridgeConfig struct {
    18  	VirtualSwitchName string
    19  }
    20  
    21  // Config defines the configuration of a docker daemon.
    22  // These are the configuration settings that you pass
    23  // to the docker daemon when you launch it with say: `docker -d -e windows`
    24  type Config struct {
    25  	CommonConfig
    26  
    27  	// Fields below here are platform specific. (There are none presently
    28  	// for the Windows daemon.)
    29  }
    30  
    31  // InstallFlags adds command-line options to the top-level flag parser for
    32  // the current process.
    33  // Subsequent calls to `flag.Parse` will populate config with values parsed
    34  // from the command-line.
    35  func (config *Config) InstallFlags(cmd *flag.FlagSet, usageFn func(string) string) {
    36  	// First handle install flags which are consistent cross-platform
    37  	config.InstallCommonFlags(cmd, usageFn)
    38  
    39  	// Then platform-specific install flags.
    40  	cmd.StringVar(&config.Bridge.VirtualSwitchName, []string{"b", "-bridge"}, "", "Attach containers to a virtual switch")
    41  }