Packages

object Docker

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Docker
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class AvailablePort(host: ServiceHost, port: Int) extends HostPortPair with Product with Serializable
  2. final case class ClientConfig(globalReuse: DockerReusePolicy = ClientConfig.defaultReusePolicy, useRemote: Boolean = false, useGlobalRegistry: Boolean = false, remote: Option[RemoteDockerConfig] = None, globalRegistry: Option[String] = None, registryConfigs: List[DockerRegistryConfig] = List.empty) extends Product with Serializable

    Client configuration that will be read from HOCON config.

    Client configuration that will be read from HOCON config. See docker-reference.conf for an example configuration. You can include the reference configuration if you want to use defaults.

    globalReuse

    If true and container's ContainerConfig#reuse is also true, keeps container alive after initialization. If false, the container will be shut down.

    useRemote

    Connect to Remote Docker Daemon

    useGlobalRegistry

    Use specified global Docker Registry.

    remote

    Options to connect to a Remote or Custom Docker Daemon (e.g. custom unix socket or pipe), will try to connect to using these options only if useRemote is true

    globalRegistry

    Registry for global usage if not overriden in ContainerConfig and if useGlobalRegistry is true.

    registryConfigs

    Registry credentials to connect to custom Docker Registry host.

  3. final case class ContainerConfig[+Tag](image: String, registry: Option[String] = None, ports: Seq[DockerPort], name: Option[String] = None, env: ContainerEnvironment = ContainerEnvironment.empty, userTags: Map[String, String] = Map.empty, cmd: Seq[String] = Seq.empty, entrypoint: Seq[String] = Seq.empty, cwd: Option[String] = None, user: Option[String] = None, mounts: Seq[Mount] = Seq.empty, networks: Set[ContainerNetwork[_]] = Set.empty, reuse: DockerReusePolicy = DockerReusePolicy.ReuseEnabled, autoRemove: Boolean = true, healthCheckInterval: FiniteDuration = FiniteDuration(1, TimeUnit.SECONDS), healthCheckMaxAttempts: Int = 120, pullTimeout: FiniteDuration = FiniteDuration(120, TimeUnit.SECONDS), pullAttempts: Int = 3, pullAttemptInitialSleep: FiniteDuration = FiniteDuration(1, TimeUnit.SECONDS), pullAttemptMaxSleep: FiniteDuration = FiniteDuration(3, TimeUnit.SECONDS), healthCheck: ContainerHealthCheck = ContainerHealthCheck.portCheck, portProbeTimeout: FiniteDuration = FiniteDuration(200, TimeUnit.MILLISECONDS), autoPull: Boolean = true) extends Product with Serializable

    Parameters that define the behavior of this docker container, Will be interpreted by ContainerResource

    Parameters that define the behavior of this docker container, Will be interpreted by ContainerResource

    image

    Docker Image to use

    registry

    Default Docker registry to use. If not specified will use Docker Hub Registry.

    ports

    Ports to map on the docker container

    name

    Name of the container, if left at None Docker will generate a random name

    env

    Setup environment variables visible inside docker container

    userTags

    User defined container labels that used to differentiate between containers with the same name but with different configs

    cmd

    Entrypoint command to use

    entrypoint

    Docker entrypoint to use

    cwd

    Working directory to use inside the docker container

    mounts

    Host paths mounted to Volumes inside the docker container

    networks

    Docker networks to connect this container to

    reuse

    If true and ClientConfig#globalReuse is also true, keeps container alive after tests. If false, the container will be shut down. default: true

    autoRemove

    Enable autoremove flag (--rm) for spawned docker image, ensures prompt pruning of containers running to completion. Note: must be disabled if you want to use ContainerHealthCheck.exitCodeCheck

    healthCheckInterval

    Sleep interval between healthChecks default: 1 second

    pullTimeout

    Maximum amount of time to wait for docker pull to download the image default: 120 seconds

    pullAttempts

    Maximum number of attempts for docker pull. If pull unexpectedly failed will try again after exponential backoff sleep. default: 3

    pullAttemptInitialSleep

    Initial exponential backoff sleep duration after failed attempt to download the image with docker pull. default: 1 seconds

    pullAttemptMaxSleep

    Max exponential backoff sleep duration after failed attempt to download the image with docker pull. default: 3 seconds

    healthCheck

    The function to use to test if a container has started already, by default probes to check if all ports are open and proceeds if so.

    portProbeTimeout

    Sleep interval between port probes in the default healthCheck default: 200 milliseconds

    autoPull

    Pull the image if it does not exists before starting the container. default: true, should only be disabled if you absolutely must manage the image manually.

  4. trait ContainerEnvironment extends AnyRef
  5. final case class ContainerId(name: String) extends AnyVal with Product with Serializable
  6. sealed trait ContainerState extends AnyRef
  7. sealed trait DockerPort extends AnyRef
  8. final case class DockerRegistryConfig(registry: String, username: String, password: String, email: Option[String] = None) extends Product with Serializable
  9. sealed abstract class DockerReusePolicy extends AnyRef
  10. final case class Mount(hostPath: String, containerPath: String, noCopy: Boolean = false) extends Product with Serializable
  11. final case class RemoteDockerConfig(host: String, tlsVerify: Boolean = false, certPath: String = "/home/user/.docker/certs", config: String = "/home/user/.docker") extends Product with Serializable

    host

    Valid options:

    • "tcp://X.X.X.X:2375" for Remote Docker Daemon
    • "unix:///var/run/docker.sock" for Unix sockets support
    • "npipe:////./pipe/docker_engine" for Windows Npipe support
  12. final case class ReportedContainerConnectivity(dockerHost: Option[String], containerAddresses: Seq[ServiceHost], dockerPorts: Map[DockerPort, NEList[ServicePort]]) extends Product with Serializable
  13. sealed trait ServiceHost extends AnyRef
  14. final case class ServicePort(host: ServiceHost, port: Int) extends Product with Serializable
  15. final case class UnmappedPorts(ports: Seq[DockerPort]) extends Product with Serializable

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  20. object AvailablePort extends Serializable
  21. object ClientConfig extends Serializable
  22. object ContainerEnvironment
  23. object ContainerState
  24. object DockerPort
  25. object DockerReusePolicy
  26. object ServiceHost

Inherited from AnyRef

Inherited from Any

Ungrouped