public class DockerConfigReader extends Object
| Constructor and Description |
|---|
DockerConfigReader() |
| Modifier and Type | Method and Description |
|---|---|
RegistryAuth |
anyRegistryAuth()
Return a single RegistryAuth from the default config file.
|
RegistryConfigs |
authForAllRegistries(Path configPath)
Parse the contents of the config file and generate all possible
RegistryAuths, which are bundled into a RegistryConfigs instance. |
RegistryAuth |
authForRegistry(Path configPath,
String registry)
Generate
RegistryAuth for the registry. |
Path |
defaultConfigPath() |
RegistryConfigs |
fromConfig(Path configPath)
Deprecated.
Use
authForAllRegistries(Path) instead. |
RegistryAuth |
fromConfig(Path configPath,
String serverAddress)
Deprecated.
In favor of
authForRegistry(Path, String) |
@Deprecated public RegistryConfigs fromConfig(Path configPath) throws IOException
authForAllRegistries(Path) instead.RegistryAuths, which are bundled into a RegistryConfigs instance.configPath - Path to config file.IOException - If the file cannot be read, or its JSON cannot be parsed@Deprecated public RegistryAuth fromConfig(Path configPath, String serverAddress) throws IOException
authForRegistry(Path, String)IllegalArgumentException - if the config file does not contain registry auth info for the
registryIOExceptionpublic RegistryAuth anyRegistryAuth() throws IOException
IOExceptionpublic RegistryConfigs authForAllRegistries(Path configPath) throws IOException
RegistryAuths, which are bundled into a RegistryConfigs instance.configPath - Path to config file.IOException - If the file cannot be read, or its JSON cannot be parsedpublic RegistryAuth authForRegistry(Path configPath, String registry) throws IOException
RegistryAuth for the registry.configPath - Path to the docker config fileregistry - Docker registry for which to generate authIOExceptionpublic Path defaultConfigPath()
Copyright © 2019. All rights reserved.