Allow docker build secrets to be files#14559
Draft
eerhardt wants to merge 1 commit intodotnet:release/13.2from
Draft
Allow docker build secrets to be files#14559eerhardt wants to merge 1 commit intodotnet:release/13.2from
eerhardt wants to merge 1 commit intodotnet:release/13.2from
Conversation
This allows people to pass .npmrc files as docker secrets without baking auth credentials into this image.
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14559Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14559" |
Member
|
Do you think we should have `WithBuildSecretFile(callback) where we can give it a file, but defer evaluation. |
karolz-ms
requested changes
Feb 19, 2026
| foreach (var buildSecret in buildSecrets) | ||
| { | ||
| if (requireValue && buildSecret.Value is null) | ||
| if (buildSecret.Value.Type == BuildImageSecretType.File) |
Member
There was a problem hiding this comment.
We should be explicit here and use type=file or type=env, as appropriate https://docs.docker.com/reference/cli/docker/buildx/build/#secret
Member
There was a problem hiding this comment.
Compare with https://docs.podman.io/en/latest/markdown/podman-build.1.html (supports the same type designator)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This allows people to pass .npmrc files as docker secrets without baking auth credentials into this image.
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: