Usage
buildcharts generate, the plugin starts or reuses the DinD container, updates .buildcharts/docker-bake.hcl, and leaves the Docker daemon running for reuse (memory footprint ~40 MB).
What it does
- Starts a
buildcharts-dindcontainer using thedocker:27-dindimage - Reuses the container if it already exists, or removes and recreates it if the image differs
- Runs the container in privileged mode, binds port
2375, and disables TLS - Supports
BUILDCHARTS_DIND_IMAGEto override the Docker image tag - Patches the generated
docker-bake.hclfortarget "test":TESTCONTAINERS_HOST_OVERRIDE- arg with DinD container IPhost.docker.internal- extra host that resolves to the host gateway
- Writes
.buildcharts/plugins/TestcontainersDinD@v1/container_debuginfo.json
Environment variables
BUILDCHARTS_DIND_IMAGE
Notes
- If the generated Bake plan has no
testtarget, the patch step is skipped. - The plugin leaves the
buildcharts-dindcontainer running for reuse across builds.