mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
cd9879744f
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
33 lines
801 B
Go
33 lines
801 B
Go
package main
|
|
|
|
import (
|
|
"path/filepath"
|
|
|
|
"github.com/docker/docker/cli"
|
|
"github.com/docker/docker/cliconfig"
|
|
flag "github.com/docker/docker/pkg/mflag"
|
|
"github.com/docker/docker/utils"
|
|
)
|
|
|
|
var clientFlags = &cli.ClientFlags{FlagSet: new(flag.FlagSet), Common: commonFlags}
|
|
|
|
func init() {
|
|
client := clientFlags.FlagSet
|
|
client.StringVar(&clientFlags.ConfigDir, []string{"-config"}, cliconfig.ConfigDir(), "Location of client config files")
|
|
|
|
clientFlags.PostParse = func() {
|
|
clientFlags.Common.PostParse()
|
|
|
|
if clientFlags.ConfigDir != "" {
|
|
cliconfig.SetConfigDir(clientFlags.ConfigDir)
|
|
}
|
|
|
|
if clientFlags.Common.TrustKey == "" {
|
|
clientFlags.Common.TrustKey = filepath.Join(cliconfig.ConfigDir(), defaultTrustKeyFile)
|
|
}
|
|
|
|
if clientFlags.Common.Debug {
|
|
utils.EnableDebug()
|
|
}
|
|
}
|
|
}
|