object Docker
- Alphabetic
- By Inheritance
- Docker
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class AvailablePort(host: ServiceHost, port: Int) extends HostPortPair with Product with Serializable
- 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 caninclude
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.
- 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.
- trait ContainerEnvironment extends AnyRef
- final case class ContainerId(name: String) extends AnyVal with Product with Serializable
- sealed trait ContainerState extends AnyRef
- sealed trait DockerPort extends AnyRef
- final case class DockerRegistryConfig(registry: String, username: String, password: String, email: Option[String] = None) extends Product with Serializable
- sealed abstract class DockerReusePolicy extends AnyRef
- final case class Mount(hostPath: String, containerPath: String, noCopy: Boolean = false) extends Product with Serializable
- 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
- final case class ReportedContainerConnectivity(dockerHost: Option[String], containerAddresses: Seq[ServiceHost], dockerPorts: Map[DockerPort, NEList[ServicePort]]) extends Product with Serializable
- sealed trait ServiceHost extends AnyRef
- final case class ServicePort(host: ServiceHost, port: Int) extends Product with Serializable
- final case class UnmappedPorts(ports: Seq[DockerPort]) extends Product with Serializable
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
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()
- object AvailablePort extends Serializable
- object ClientConfig extends Serializable
- object ContainerEnvironment
- object ContainerState
- object DockerPort
- object DockerReusePolicy
- object ServiceHost