docker/client.go
1b95590d
 package main
 
 import (
96ce3a19
 	"path/filepath"
 
 	"github.com/docker/docker/cli"
 	"github.com/docker/docker/cliconfig"
 	flag "github.com/docker/docker/pkg/mflag"
cd987974
 	"github.com/docker/docker/utils"
1b95590d
 )
 
96ce3a19
 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)
 		}
cd987974
 
 		if clientFlags.Common.Debug {
 			utils.EnableDebug()
 		}
96ce3a19
 	}
1b95590d
 }