Skip to content

Support build secrets with buildkit (version 2) - #821

Closed
relu91 wants to merge 2 commits into
apocas:masterfrom
relu91:feat/build-secrets
Closed

relu91 wants to merge 2 commits into
apocas:masterfrom
relu91:feat/build-secrets

Conversation

@relu91

@relu91 relu91 commented Dec 10, 2025

Copy link
Copy Markdown

Hello here! I notice that the latest support for buildkit #766 didn't cover the ability to express secrets in the build request. This PR covers this gap by following the already implemented pattern and adding an additional option to the buildImage method.

Secrets can be passed as a map of secretId : Buffer.

@apocas

apocas commented Dec 12, 2025

Copy link
Copy Markdown
Owner

Hi,

Thank you for your time :)

Could you please check the tests:
https://github.com/apocas/dockerode/actions/runs/20104364824/job/57847453313?pr=821#step:6:462

Best regards,

@apocas

apocas commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Thank you for the contribution and for proposing BuildKit secret support. Closing this PR as superseded by #854 (commit 3944a58).

The replacement preserves the caller's secret values while excluding them from build request parameters, returns NOT_FOUND for missing secrets so optional mounts work, and retains the session health service from #847. It also adds session RPC and real Docker build regression coverage; all 29 targeted tests passed locally on Node 24 against Docker Engine 29.9.2.

@apocas apocas closed this Oct 27, 2026
@relu91

relu91 commented Oct 29, 2026

Copy link
Copy Markdown
Author

Thanks, and sorry for not following up on your action point above. I got busy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants