Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigFile

type ConfigFile struct {
	AuthConfigs          map[string]types.AuthConfig `json:"auths"`
	HTTPHeaders          map[string]string           `json:"HttpHeaders,omitempty"`
	PsFormat             string                      `json:"psFormat,omitempty"`
	ImagesFormat         string                      `json:"imagesFormat,omitempty"`
	NetworksFormat       string                      `json:"networksFormat,omitempty"`
	PluginsFormat        string                      `json:"pluginsFormat,omitempty"`
	VolumesFormat        string                      `json:"volumesFormat,omitempty"`
	StatsFormat          string                      `json:"statsFormat,omitempty"`
	DetachKeys           string                      `json:"detachKeys,omitempty"`
	CredentialsStore     string                      `json:"credsStore,omitempty"`
	CredentialHelpers    map[string]string           `json:"credHelpers,omitempty"`
	Filename             string                      `json:"-"` // Note: for internal use only
	ServiceInspectFormat string                      `json:"serviceInspectFormat,omitempty"`
	ServicesFormat       string                      `json:"servicesFormat,omitempty"`
	TasksFormat          string                      `json:"tasksFormat,omitempty"`
	SecretFormat         string                      `json:"secretFormat,omitempty"`
	ConfigFormat         string                      `json:"configFormat,omitempty"`
	NodesFormat          string                      `json:"nodesFormat,omitempty"`
	PruneFilters         []string                    `json:"pruneFilters,omitempty"`
	Proxies              map[string]ProxyConfig      `json:"proxies,omitempty"`
	Experimental         string                      `json:"experimental,omitempty"`
	StackOrchestrator    string                      `json:"stackOrchestrator,omitempty"`
	Kubernetes           *KubernetesConfig           `json:"kubernetes,omitempty"`
}

    ConfigFile ~/.docker/config.json file info

    func New

    func New(fn string) *ConfigFile

      New initializes an empty configuration file for the given filename 'fn'

      func (*ConfigFile) ContainsAuth

      func (configFile *ConfigFile) ContainsAuth() bool

        ContainsAuth returns whether there is authentication configured in this file or not.

        func (*ConfigFile) GetAllCredentials

        func (configFile *ConfigFile) GetAllCredentials() (map[string]types.AuthConfig, error)

          GetAllCredentials returns all of the credentials stored in all of the configured credential stores.

          func (*ConfigFile) GetAuthConfig

          func (configFile *ConfigFile) GetAuthConfig(registryHostname string) (types.AuthConfig, error)

            GetAuthConfig for a repository from the credential store

            func (*ConfigFile) GetAuthConfigs

            func (configFile *ConfigFile) GetAuthConfigs() map[string]types.AuthConfig

              GetAuthConfigs returns the mapping of repo to auth configuration

              func (*ConfigFile) GetCredentialsStore

              func (configFile *ConfigFile) GetCredentialsStore(registryHostname string) credentials.Store

                GetCredentialsStore returns a new credentials store from the settings in the configuration file

                func (*ConfigFile) GetFilename

                func (configFile *ConfigFile) GetFilename() string

                  GetFilename returns the file name that this config file is based on.

                  func (*ConfigFile) LegacyLoadFromReader

                  func (configFile *ConfigFile) LegacyLoadFromReader(configData io.Reader) error

                    LegacyLoadFromReader reads the non-nested configuration data given and sets up the auth config information with given directory and populates the receiver object

                    func (*ConfigFile) LoadFromReader

                    func (configFile *ConfigFile) LoadFromReader(configData io.Reader) error

                      LoadFromReader reads the configuration data given and sets up the auth config information with given directory and populates the receiver object

                      func (*ConfigFile) ParseProxyConfig

                      func (configFile *ConfigFile) ParseProxyConfig(host string, runOpts []string) map[string]*string

                        ParseProxyConfig computes proxy configuration by retrieving the config for the provided host and then checking this against any environment variables provided to the container

                        func (*ConfigFile) Save

                        func (configFile *ConfigFile) Save() error

                          Save encodes and writes out all the authorization information

                          func (*ConfigFile) SaveToWriter

                          func (configFile *ConfigFile) SaveToWriter(writer io.Writer) error

                            SaveToWriter encodes and writes out all the authorization information to the given writer

                            type KubernetesConfig

                            type KubernetesConfig struct {
                            	AllNamespaces string `json:"allNamespaces,omitempty"`
                            }

                              KubernetesConfig contains Kubernetes orchestrator settings

                              type ProxyConfig

                              type ProxyConfig struct {
                              	HTTPProxy  string `json:"httpProxy,omitempty"`
                              	HTTPSProxy string `json:"httpsProxy,omitempty"`
                              	NoProxy    string `json:"noProxy,omitempty"`
                              	FTPProxy   string `json:"ftpProxy,omitempty"`
                              }

                                ProxyConfig contains proxy configuration settings

                                Source Files