Package org.mandas.docker.client
Class DockerConfigReader
java.lang.Object
org.mandas.docker.client.DockerConfigReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn a single RegistryAuth from the default config file.authForAllRegistries(Path configPath) Parse the contents of the config file and generate all possibleRegistryAuths, which are bundled into aRegistryConfigsinstance.authForRegistry(Path configPath, String registry) GenerateRegistryAuthfor the registry.
-
Constructor Details
-
DockerConfigReader
public DockerConfigReader()
-
-
Method Details
-
anyRegistryAuth
Return a single RegistryAuth from the default config file. If there is only one, it'll be that one.- Returns:
- Some registry auth value.
- Throws:
IOException- when an error occured during reading for docker configuration
-
authForAllRegistries
Parse the contents of the config file and generate all possibleRegistryAuths, which are bundled into aRegistryConfigsinstance.- Parameters:
configPath- Path to config file.- Returns:
- All registry auths that can be generated from the config file
- Throws:
IOException- If the file cannot be read, or its JSON cannot be parsed
-
authForRegistry
GenerateRegistryAuthfor the registry.- Parameters:
configPath- Path to the docker config fileregistry- Docker registry for which to generate auth- Returns:
- The generated authentication object
- Throws:
IOException- when an error occured while reading the docker configuration
-
defaultConfigPath
-