Documentation
¶
Index ¶
- func DefaultDockerConfigJSONPaths() []string
- func DefaultDockercfgPaths() []string
- func GetPreferredDockercfgPath() string
- func ReadURL(url string, client *http.Client, header *http.Header) (body []byte, err error)
- func SetPreferredDockercfgPath(path string)
- type DockerConfig
- func ReadDockerConfigFile() (cfg DockerConfig, err error)
- func ReadDockerConfigFileFromURL(url string, client *http.Client, header *http.Header) (cfg DockerConfig, err error)
- func ReadDockerConfigJSONFile(searchPaths []string) (cfg DockerConfig, err error)
- func ReadDockercfgFile(searchPaths []string) (cfg DockerConfig, err error)
- func ReadSpecificDockerConfigJSONFile(filePath string) (cfg DockerConfig, err error)
- type DockerConfigEntry
- type DockerConfigJSON
- type HTTPError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDockerConfigJSONPaths ¶
func DefaultDockerConfigJSONPaths() []string
DefaultDockerConfigJSONPaths returns default search paths of .docker/config.json
func DefaultDockercfgPaths ¶
func DefaultDockercfgPaths() []string
DefaultDockercfgPaths returns default search paths of .dockercfg
func GetPreferredDockercfgPath ¶
func GetPreferredDockercfgPath() string
GetPreferredDockercfgPath get preferred docker config path
func SetPreferredDockercfgPath ¶
func SetPreferredDockercfgPath(path string)
SetPreferredDockercfgPath set preferred docker config path
Types ¶
type DockerConfig ¶
type DockerConfig map[string]DockerConfigEntry
DockerConfig represents the config file used by the docker CLI. This config that represents the credentials that should be used when pulling images from specific image repositories.
func ReadDockerConfigFile ¶
func ReadDockerConfigFile() (cfg DockerConfig, err error)
ReadDockerConfigFile read a docker config file from default path
func ReadDockerConfigFileFromURL ¶
func ReadDockerConfigFileFromURL(url string, client *http.Client, header *http.Header) (cfg DockerConfig, err error)
ReadDockerConfigFileFromURL read a docker config file from the given url
func ReadDockerConfigJSONFile ¶
func ReadDockerConfigJSONFile(searchPaths []string) (cfg DockerConfig, err error)
ReadDockerConfigJSONFile attempts to read a docker config.json file from the given paths. if searchPaths is empty, the default paths are used.
func ReadDockercfgFile ¶
func ReadDockercfgFile(searchPaths []string) (cfg DockerConfig, err error)
ReadDockercfgFile attempts to read a legacy dockercfg file from the given paths. if searchPaths is empty, the default paths are used.
func ReadSpecificDockerConfigJSONFile ¶
func ReadSpecificDockerConfigJSONFile(filePath string) (cfg DockerConfig, err error)
ReadSpecificDockerConfigJSONFile attempts to read docker configJSON from a given file path.
type DockerConfigEntry ¶
DockerConfigEntry wraps a docker config as a entry
func (DockerConfigEntry) MarshalJSON ¶
func (ident DockerConfigEntry) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*DockerConfigEntry) UnmarshalJSON ¶
func (ident *DockerConfigEntry) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type DockerConfigJSON ¶
type DockerConfigJSON struct {
Auths DockerConfig `json:"auths"`
// +optional
HTTPHeaders map[string]string `json:"HttpHeaders,omitempty"`
}
DockerConfigJSON represents ~/.docker/config.json file info see https://github.com/docker/docker/pull/12009