Docker
Docker Setup
Configure DxCore to parallelize Docker Buildx builds.
Note
DxCore is not affiliated with, endorsed by, or sponsored by Docker, Inc. Docker and Docker Buildx are trademarks of Docker, Inc. See Trademarks & Attribution.
⚠️ Experimental: Docker support is experimental. APIs and behavior may change without notice.
Prerequisites
- A project using Docker Buildx with a
docker-bake.hclordocker-bake.jsonfile - The
dxcorebinary installed - Access to a DxCore coordinator
How It Works
The Docker adapter uses docker buildx bake --print to extract build targets. DxCore parses the output to discover targets, Dockerfiles, build contexts, and cross-target dependencies.
When an agent executes a task, it runs:
docker buildx build -f <dockerfile> -t <tags> --push <context>
Producing the Task Graph
Pipe the bake output to the dispatcher:
docker buildx bake --print | dxcore dispatch \
-c $COORDINATOR_URL -s $SESSION_ID -t $TOKEN -b docker
Important
Always pass -b docker to both the dispatcher and agents.
What Gets Extracted
From the docker buildx bake --print output, DxCore extracts:
| Field | Description |
|---|---|
| Target name | Used as the task ID |
| Dockerfile | Path to the Dockerfile |
| Context | Build context directory |
| Tags | Image tags for the build |
| Dependencies | Cross-target contexts references |
Agent Requirements
Agents running Docker tasks need:
- Docker daemon access (or Docker-in-Docker in CI)
- Registry credentials if pushing images
- Sufficient disk space for build layers
Warning
Docker builds can be resource-intensive. Ensure your CI runners have adequate CPU and memory. Use agent tags to route Docker tasks to appropriate runners.