Skip to content

Migrate from remote driver to docker-container driver#23

Closed
dash14 wants to merge 7 commits intomainfrom
refactor/docker-container-driver
Closed

Migrate from remote driver to docker-container driver#23
dash14 wants to merge 7 commits intomainfrom
refactor/docker-container-driver

Conversation

@dash14
Copy link
Copy Markdown
Owner

@dash14 dash14 commented Mar 16, 2026

Why

The remote driver had several limitations:

  • TCP port exposure required — buildkitd listened on a TCP port (1234) for the host to connect, adding attack surface and requiring iptables rules to block access from build containers
  • docker-compose dependency — container lifecycle (network, volume, port mapping) was managed via compose, adding complexity to both the setup action and local development

The docker-container driver resolves all of these:

  • No TCP port exposure — communication uses Docker's internal mechanism, eliminating the need for port mapping and iptables hardening
  • Single command setupdocker buildx create handles container lifecycle, with built-in cleanup via docker buildx rm

Changes

  • Replace s6-rc (compile-time service graph) with s6-svscan (runtime supervision) and add a custom entrypoint.sh` for init scripts + service startup
  • Remove compose.yml, setup/compose.yml, and compose.test.yml network/volume definitions that were only needed for the remote driver
  • Refactor setup/main.mjs to call docker buildx create directly with driver-opts instead of docker-compose up
  • Refactor report/main.mjs to use docker exec on the buildkit container instead of relying on compose service names
  • Update test.yml to use ./setup and ./report actions directly, serving as E2E tests for the actions themselves
  • Remove leftover remote driver references from example workflows, docs, and iptables rules (TCP port 1234)
  • Update architecture and report diagrams

dash14 added 7 commits March 16, 2026 22:26
Replace the remote driver (via docker compose) with the docker-container driver, which embeds the buildcage image directly as a BuildKit builder.
Replace docker-compose based container management with `docker buildx create --driver docker-container` in setup/report actions. Remove compose.yml, simplify post cleanup, and update README examples to reflect the new two-step workflow.
The docker-container driver overrides CMD so the --addr flag in the Dockerfile was dead code. With no TCP listener, the iptables rules blocking port 1234 from buildkit0 are also unnecessary.
@dash14 dash14 closed this Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant