Class DockerLoginByToken
java.lang.Object
net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
net.ssehub.easy.instantiation.docker.instantiators.AbstractDockerInstantiator
net.ssehub.easy.instantiation.docker.instantiators.DockerLoginByToken
- All Implemented Interfaces:
net.ssehub.easy.instantiation.core.model.vilTypes.IVilType
Instantiator to log into a registry.
- Author:
- Monika Staciwa
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static com.github.dockerjava.api.model.AuthConfigFields inherited from class net.ssehub.easy.instantiation.docker.instantiators.AbstractDockerInstantiator
FAIL_ON_ERROR, SKIP_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidclear()Clears an existing authentication token.static booleandockerLoginByToken(String registry, String user, String token) Logs into the given docker registry.(package private) static com.github.dockerjava.api.model.AuthConfigMethods inherited from class net.ssehub.easy.instantiation.docker.instantiators.AbstractDockerInstantiator
createClient, handleThrowable, skipMethods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
determineTargetPath, toString
-
Field Details
-
authConfig
private static com.github.dockerjava.api.model.AuthConfig authConfig
-
-
Constructor Details
-
DockerLoginByToken
public DockerLoginByToken()
-
-
Method Details
-
getAuthConfig
static com.github.dockerjava.api.model.AuthConfig getAuthConfig() -
clear
static void clear()Clears an existing authentication token. -
dockerLoginByToken
public static boolean dockerLoginByToken(String registry, String user, String token) throws net.ssehub.easy.instantiation.core.model.common.VilException Logs into the given docker registry. Stores the authentication configuration if successful and applies it automatically.- Parameters:
registry- the registry addressuser- the user nametoken- the identity token- Returns:
trueif successful- Throws:
net.ssehub.easy.instantiation.core.model.common.VilException- in case of artifact / parameter problems
-