feat: add driver-opts support for buildkitd environment variables #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for
driver-optsinput parameter to the setup-docker-builder action, enabling users to pass environment variables to buildkitd. This brings API compatibility with Docker's setup-buildx-action for driver options.Key Changes
driver-optsinput parameter to action.ymlUtil.getInputListwithignoreComma: trueandquote: false(matching Docker's approach)env.*format for passing environment variables to buildkitdUse Case
This enables OpenTelemetry tracing and other environment-based configuration for buildkitd:
Testing
src/driver-opts.test.tstest-driver-optsin.github/workflows/test-action.ymlCompatibility
This implementation closely mirrors the parsing logic from docker/setup-buildx-action to ensure compatibility while adapting to our direct buildkitd execution approach.
🤖 Generated with Claude Code
Note
Adds
driver-optsinput and plumbing to passenv.*options to buildkitd, with tests, CI workflow, and usage example.inputs.driver-optsinaction.yml.driver-optsviaUtil.getInputList({ignoreComma: true, quote: false})insrc/main.ts.src/setup_builder.ts, parseenv.*entries and startbuildkitdwithsudo env KEY='value' ....src/driver-opts.test.tscovering env parsing, quoting, and warnings.src/main.test.tsto validate input handling fordriver-opts.test-driver-optsin.github/workflows/test-action.ymlto exercise driver options.examples/with-driver-opts.ymldemonstrating OTEL configuration.dist/index.jsand source map.Written by Cursor Bugbot for commit 383d6bd. This will update automatically on new commits. Configure here.