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

public class DockerLoginByToken extends AbstractDockerInstantiator
Instantiator to log into a registry.
Author:
Monika Staciwa
  • 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 address
      user - the user name
      token - the identity token
      Returns:
      true if successful
      Throws:
      net.ssehub.easy.instantiation.core.model.common.VilException - in case of artifact / parameter problems