Run Docker builds
You can build and run containers inside a running Raft box. Set $box to your task's handle from raft list. The development image includes its own Docker daemon; it does not mount the host Docker socket.
Boxes share the host kernel, with no host kernel-module or KVM access. Stopping or expiring the box ends its nested containers too.
Check daemon readiness
raft exec "$box" -- docker info
raft exec "$box" -- docker run --rm alpine:3.22 uname -adocker --version checks only the client. If docker info fails during startup, wait for the daemon before starting a build. For persistent failures, inspect raft exec "$box" -- journalctl -u docker -n 50 --no-pager.
Build your project image
Copy a project containing a Dockerfile into /workspace/my-project using the file guide, then build it:
raft exec "$box" -- docker build -t project-app /workspace/my-project
raft exec "$box" -- docker run --rm project-appFor a published service, use private forwarding. Binding a service inside a nested container alone does not open a public host port.
Limit Docker disk growth
Docker images, layers and volumes use the box's filesystem. Shared-pool boxes can fill storage for every box on that pool. On a host with own disks enabled, create a build box with a fixed disk:
box=$(raft new --location lab --ttl 3600 --disk 40GiB --persistent --purpose "Docker builds" --owner "Local operator" --next "Remove unused build data")An own disk returns "No space left on device" at its cap, including Docker writes. Inspect raft usage "$box" and raft exec "$box" -- docker system df before removing data.
docker image prune -f deletes dangling images. Do not run broader pruning unless you intend to lose stopped containers, unused volumes and caches. To move a persistent box onto a larger disk, snapshot and copy it.