2020-04-08 16:21:02 +02:00
package context
import (
"path/filepath"
"github.com/docker/docker/pkg/homedir"
"github.com/urfave/cli"
)
const (
// ConfigFileName is the name of config file
ConfigFileName = "config.json"
configFileDir = ".docker"
)
var (
ConfigDir string
ConfigFlag = cli . StringFlag {
Name : "config" ,
2020-04-15 16:55:30 +02:00
Usage : "Location of client config files `DIRECTORY`" ,
2020-04-08 16:21:02 +02:00
EnvVar : "DOCKER_CONFIG" ,
Value : filepath . Join ( homedir . Get ( ) , configFileDir ) ,
Destination : & ConfigDir ,
}
ContextName string
ContextFlag = cli . StringFlag {
Name : "context, c" ,
2020-04-15 16:55:30 +02:00
Usage : "Name of the context `CONTEXT` to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with \"docker context use\")" ,
2020-04-08 16:21:02 +02:00
EnvVar : "DOCKER_CONTEXT" ,
Destination : & ContextName ,
}
)