final case class ContainerConfig[+Tag](image: String, registry: Option[String] = None, ports: Seq[DockerPort], name: Option[String] = None, env: Map[String, String] = Map.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), 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 izumi.distage.docker.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- 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.
- Alphabetic
- By Inheritance
- ContainerConfig
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ContainerConfig(image: String, registry: Option[String] = None, ports: Seq[DockerPort], name: Option[String] = None, env: Map[String, String] = Map.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), 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- 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
- 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val autoPull: Boolean
- 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
- 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 registry: Option[String]
- 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]
- val userTags: Map[String, 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()