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

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.

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ContainerConfig
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ContainerConfig(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)

    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.

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. val autoPull: Boolean
  6. val autoRemove: Boolean
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. val cmd: Seq[String]
  9. val cwd: Option[String]
  10. val entrypoint: Seq[String]
  11. val env: ContainerEnvironment
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. val healthCheck: ContainerHealthCheck
  16. val healthCheckInterval: FiniteDuration
  17. val healthCheckMaxAttempts: Int
  18. val image: String
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. val mounts: Seq[Mount]
  21. val name: Option[String]
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. val networks: Set[ContainerNetwork[_]]
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. val portProbeTimeout: FiniteDuration
  27. val ports: Seq[DockerPort]
  28. def productElementNames: Iterator[String]
    Definition Classes
    Product
  29. val pullAttemptInitialSleep: FiniteDuration
  30. val pullAttemptMaxSleep: FiniteDuration
  31. val pullAttempts: Int
  32. val pullTimeout: FiniteDuration
  33. val registry: Option[String]
  34. val reuse: DockerReusePolicy
  35. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  36. def tcpPorts: Set[DockerPort]
  37. def udpPorts: Set[DockerPort]
  38. val user: Option[String]
  39. val userTags: Map[String, String]
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped