docker CLI, including docker buildx and docker compose, to build images and run containers as part of their work.
The setting is off by default, applies to the whole organization, and is currently in beta.
When to use Docker in sessions
- Your repositories build container images or run tests with Docker Compose.
- Agents need to start services, such as databases, in containers to verify their changes.
Prerequisites
- You are signed in as an administrator.
- On self-hosted Kubernetes, your cluster allows privileged containers in the namespace where session pods run. The Docker daemon runs in rootless mode, but its sidecar container still sets
privileged: truein its security context. Pod Security Admission policies or admission controllers that reject privileged pods block Docker-enabled sessions from starting.
Turn on Docker
- Sign in to Cake Agents as an administrator.
- Open
Settings → Organization → Sessions. - In the Docker section, toggle Enable Docker on.
How Docker runs in a session
- Cake Agents adds a container named
dockerto each session pod. It runs a rootless Docker daemon (docker:29.10.0-dind-rootless) and requests 100m CPU and 256Mi memory. - The daemon listens only on a Unix socket shared with the session container. It does not expose a TCP API on the pod network.
- Cake Agents sets
DOCKER_HOSTtounix:///var/lib/cake/docker/docker.sockin the session, sodockercommands reach the daemon without extra configuration.
DOCKER_HOST is not set, so docker commands fail to connect.