How ContainerisedWorkspace starts its container, beyond the sandbox: how long it waits for the runner, the container's resource limits, the user its runner runs as, and where its port is published (#3063, #3064).
Built with ContainerOptions() and its with* setters; new options are added with defaults.
Value parameters
- connectHost
-
the host this client connects to;
NoneispublishAddress, or127.0.0.1when that is a wildcard (0.0.0.0,::). A remoteDOCKER_HOST's own name, orhost.docker.internal - cpus
-
the CPUs the container may use (
--cpus, fractional).Noneis no limit - memoryBytes
-
the container's memory limit (
docker run --memory, with--memory-swapthe same, so it has no swap beyond it): the runner and every command together. At least 6 MiB, Docker's least.None, the default, is Docker's: no limit - pidsLimit
-
the most processes and threads the container holds at once (
--pids-limit), the runner's JVM threads among them, so allow it a few hundred.Noneis no limit - publishAddress
-
the Docker host's address the runner's port is published on:
127.0.0.1, the default, so nothing beyond the Docker host can reach it (#3046). A remoteDOCKER_HOSTneeds an address this client can reach; the token still guards every handshake, but the connection is plainws://, so use a network you trust - runAsGroup
-
the gid the runner runs as;
Noneis the workspace directory's group, or the uid's own - runAsUser
-
the uid the runner, and so every command, runs as.
None, the default: the owner of the mounted workspace directory, so on a Linux host the files a command makes are the host user's; or, when that is root (a Docker Desktop mount, a root-owned directory), uid 1001. The runner never runs as root unless this says0, which only rootless Docker needs (its container root is the host user). The image's entry point starts as root with only the capabilities it needs to set the container up, and drops them all before the runner starts - startupTimeout
-
how long ContainerisedWorkspace.start waits for the runner to accept a connection once
docker runhas returned, before it gives up, removes the container and reports why, with the container's logs. A first run of an image whose JVM is slow to start may need more
Attributes
- Companion
- object
- Source
- ContainerOptions.scala
- Graph
-
- Supertypes
