mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
db63f9370e
This also moves some cli specific in `cmd/dockerd` as it does not really belong to the `daemon/config` package. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
25 lines
819 B
Go
25 lines
819 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
|
|
"github.com/docker/docker/daemon/config"
|
|
"github.com/spf13/pflag"
|
|
)
|
|
|
|
var (
|
|
defaultPidFile string
|
|
defaultGraph = filepath.Join(os.Getenv("programdata"), "docker")
|
|
)
|
|
|
|
// installConfigFlags adds flags to the pflag.FlagSet to configure the daemon
|
|
func installConfigFlags(conf *config.Config, flags *pflag.FlagSet) {
|
|
// First handle install flags which are consistent cross-platform
|
|
installCommonConfigFlags(conf, flags)
|
|
|
|
// Then platform-specific install flags.
|
|
flags.StringVar(&conf.BridgeConfig.FixedCIDR, "fixed-cidr", "", "IPv4 subnet for fixed IPs")
|
|
flags.StringVarP(&conf.BridgeConfig.Iface, "bridge", "b", "", "Attach containers to a virtual switch")
|
|
flags.StringVarP(&conf.SocketGroup, "group", "G", "", "Users or groups that can access the named pipe")
|
|
}
|