final case class ContainerConfig[T](image: String, ports: Seq[DockerPort], name: Option[String] = None, env: 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), healthCheck: ContainerHealthCheck[T] = ContainerHealthCheck.portCheck[T], portProbeTimeout: FiniteDuration = FiniteDuration(200, TimeUnit.MILLISECONDS), alwaysPull: Boolean = true) extends Product with Serializable
Parameters that define the behavior of this docker container, Will be interpreted by izumi.distage.docker.ContainerResource
- image
Docker Image to use
- 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
- 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
- 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- 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
- alwaysPull
Pull the image before starting the container default: true
- Alphabetic
- By Inheritance
- ContainerConfig
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ContainerConfig(image: String, ports: Seq[DockerPort], name: Option[String] = None, env: 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), healthCheck: ContainerHealthCheck[T] = ContainerHealthCheck.portCheck[T], portProbeTimeout: FiniteDuration = FiniteDuration(200, TimeUnit.MILLISECONDS), alwaysPull: Boolean = true)
- image
Docker Image to use
- 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
- 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
- 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- 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
- alwaysPull
Pull the image before starting the container default: true
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val alwaysPull: Boolean
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val autoRemove: Boolean
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val cmd: Seq[String]
- val cwd: Option[String]
- val entrypoint: Seq[String]
- val env: Map[String, String]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val healthCheck: ContainerHealthCheck[T]
- val healthCheckInterval: FiniteDuration
- val healthCheckMaxAttempts: Int
- val image: String
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val mounts: Seq[Mount]
- val name: Option[String]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val networks: Set[ContainerNetwork[_]]
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val portProbeTimeout: FiniteDuration
- val ports: Seq[DockerPort]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val pullTimeout: FiniteDuration
- val reuse: DockerReusePolicy
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tcpPorts: Set[DockerPort]
- def udpPorts: Set[DockerPort]
- val user: Option[String]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()