Documentation ¶
Overview ¶
Package dockercfg contains a command helper to read .dockercfg files
Index ¶
Constants ¶
const ( PushAuthType = "PUSH_DOCKERCFG_PATH" PullAuthType = "PULL_DOCKERCFG_PATH" PullSourceAuthType = "PULL_SOURCE_DOCKERCFG_PATH_" )
Variables ¶
This section is empty.
Functions ¶
func GetDockerConfig ¶
func GetDockerConfig(path []string) (cfg credentialprovider.DockerConfig, err error)
GetDockerConfig return docker config info by checking given paths
func GetDockercfgFile ¶ added in v1.1.3
GetDockercfgFile returns the path to the dockercfg file
func ReadDockerConfigJsonFileGeneratedFromSecret ¶
func ReadDockerConfigJsonFileGeneratedFromSecret(path []string) (cfg credentialprovider.DockerConfig, err error)
ReadDockerConfigJsonFileGeneratedFromSecret return DockerConfig by reading specific file named .dockerconfigjson generated by secret from given paths.
Types ¶
type Helper ¶
type Helper struct { }
Helper contains all the valid config options for reading the local dockercfg file
func NewHelper ¶
func NewHelper() *Helper
NewHelper creates a Flags object with the default values set.
func (*Helper) GetDockerAuth ¶
func (h *Helper) GetDockerAuth(imageName, authType string) (docker.AuthConfiguration, bool)
GetDockerAuth returns a valid Docker AuthConfiguration entry, and whether it was read from the local dockercfg file
func (*Helper) InstallFlags ¶
InstallFlags installs the Docker flag helper into a FlagSet with the default options and default values from the Helper object.