Package com.spotify.docker.client.auth
Interface RegistryAuthSupplier
-
- All Known Implementing Classes:
ConfigFileRegistryAuthSupplier
,FixedRegistryAuthSupplier
,MultiRegistryAuthSupplier
public interface RegistryAuthSupplier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RegistryAuth
authFor(java.lang.String imageName)
Returns a RegistryAuth object that works with a given registry's API [e.g.RegistryConfigs
authForBuild()
Authentication info to pass in the X-Registry-Config header when building an image.RegistryAuth
authForSwarm()
Returns a RegistryAuth object that is valid for a Docker Swarm context [i.e.
-
-
-
Method Detail
-
authFor
RegistryAuth authFor(java.lang.String imageName) throws DockerException
Returns a RegistryAuth object that works with a given registry's API [e.g. GCR].- Returns:
- the RegistryAuth to use when working with the image, or else
null
if no authentication info applies for this image - Throws:
DockerException
-
authForSwarm
RegistryAuth authForSwarm() throws DockerException
Returns a RegistryAuth object that is valid for a Docker Swarm context [i.e. not tied to specific image]. It's unnecessary if it's not planned to use this AuthSupplier to pull images for Swarm.- Returns:
- the RegistryAuth to use in Swarn, or else
null
for no authentication info - Throws:
DockerException
-
authForBuild
RegistryConfigs authForBuild() throws DockerException
Authentication info to pass in the X-Registry-Config header when building an image.- Throws:
DockerException
-
-