Docker

izumi.distage.docker.model.Docker
object Docker

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Docker.type

Members list

Type members

Classlikes

final case class AvailablePort(host: ServiceHost, port: Int) extends HostPortPair

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait HostPortPair
class Object
trait Matchable
class Any
Show all
object AvailablePort

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ClientConfig(globalReuse: DockerReusePolicy = ..., useRemote: Boolean = ..., useGlobalRegistry: Boolean = ..., remote: Option[RemoteDockerConfig] = ..., globalRegistry: Option[String] = ..., registryConfigs: List[DockerRegistryConfig] = ...)

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.

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.

Value parameters

globalRegistry

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

globalReuse

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

registryConfigs

Registry credentials to connect to custom Docker Registry host.

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

useGlobalRegistry

Use specified global Docker Registry.

useRemote

Connect to Remote Docker Daemon

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ClientConfig

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ContainerConfig[+Tag](image: String, registry: Option[String] = ..., ports: Seq[DockerPort], name: Option[String] = ..., env: ContainerEnvironment = ..., userTags: Map[String, String] = ..., cmd: Seq[String] = ..., entrypoint: Seq[String] = ..., cwd: Option[String] = ..., user: Option[String] = ..., mounts: Seq[Mount] = ..., networks: Set[ContainerNetwork[_]] = ..., reuse: DockerReusePolicy = ..., autoRemove: Boolean = ..., platform: Option[String] = ..., healthCheckInterval: FiniteDuration = ..., healthCheckMaxAttempts: Int = ..., pullTimeout: FiniteDuration = ..., pullAttempts: Int = ..., pullAttemptInitialSleep: FiniteDuration = ..., pullAttemptMaxSleep: FiniteDuration = ..., healthCheck: ContainerHealthCheck = ..., portProbeTimeout: FiniteDuration = ..., autoPull: Boolean = ..., files: Seq[ContainerFile] = ..., afterCreate: Seq[ContainerHook] = ...)

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

Value parameters

afterCreate

Hooks run in order after the container is created and before it is started, after copying files. A container is reused only if it was created with hooks of identical reuse keys, files included, compared by a digest label; see ContainerHook.

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.

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

cmd

Entrypoint command to use

cwd

Working directory to use inside the docker container

entrypoint

Docker entrypoint to use

env

Setup environment variables visible inside docker container

files

Files and directories this JVM reads and copies into the container after creating it and before starting it, before the afterCreate hooks, so the container engine never needs access to the host path. Copies are owned by root, world-readable, and executable only when the source file is; modification times are not preserved. The files are read twice: once to compute the reuse digest and once into temporary tar files, which are deleted after copying; creation fails if the files changed in between.

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.

healthCheckInterval

Sleep interval between healthChecks default: 1 second

image

Docker Image to use

mounts

Host paths mounted to Volumes inside the docker container

name

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

networks

Docker networks to connect this container to

portProbeTimeout

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

ports

Ports to map on the docker container

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: 15 seconds

pullAttempts

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

pullTimeout

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

registry

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

reuse

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

userTags

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

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Self type
final case class ContainerFile(hostPath: Path, containerPath: String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ContainerId(name: String) extends AnyVal

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait ContainerState

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Exited
object NotFound
object Running
object DockerPort

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
DockerPort.type
sealed trait DockerPort

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Dynamic
class DynamicTCP
class DynamicUDP
trait Static
class TCP
class UDP
trait TCPBase
trait UDPBase
Show all
final case class DockerRegistryConfig(registry: String, username: String, password: String, email: Option[String] = ...)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed abstract class DockerReusePolicy(val reuseEnabled: Boolean, val killEnforced: Boolean)

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ReuseDisabled
object ReuseEnabled

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class Mount(hostPath: String, containerPath: String, noCopy: Boolean = ..., readOnly: Boolean = ...)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class RemoteDockerConfig(host: String, tlsVerify: Boolean = ..., certPath: String = ..., config: String = ...)

Value parameters

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

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ReportedContainerConnectivity(dockerHost: Option[String], containerAddresses: Seq[ServiceHost], dockerPorts: Map[DockerPort, NEList[ServicePort]])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ServiceHost

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait ServiceHost

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class IPv4
class IPv6
final case class ServicePort(host: ServiceHost, port: Int)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class UnmappedPorts(ports: Seq[DockerPort])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all