Allow optional secrets.json during Docker build #1000
Closed
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.
Allow optional secrets.json during Docker build
🗣 Description
This PR allows the Dockerfile to take advantage of build secrets, allowing the pre-installed distribution build to support both environment variables and the secrets.json in a similar fashion to the entrypoint script.
💭 Motivation and context
If a user has already created a secrets file for use with their local container, this change allows the user to have a single source of truth for their credentials and reuse the secrets file for any future updates and builds of the image without needing to explicitly pass in the
FOUNDRY_USERNAME
andFOUNDRY_PASSWORD
build arguments.🧪 Testing
These changes were tested by building the image locally in a few different configurations. I tested the default build path, providing the
FOUNDRY_USERNAME
andFOUNDRY_PASSWORD
build arguments, and the secrets file.✅ Pre-approval checklist
All future TODOs are captured in issues, which are referencedin code comments.
All relevant type-of-change labels have been added.v6.14.0a0
not existing, but it passed otherwise.to reflect the changes in this PR.
Tests have been added and/or modified to cover the changes in this PR.✅ Pre-merge checklist
✅ Post-merge checklist