-
Notifications
You must be signed in to change notification settings - Fork 724
Ensure OutputPath is created in ResourceContainerImageBuilder #11831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When using docker/podman, and specifying an output path, building a docker image will fail if the directory isn't created. Ensure it is created.
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11831Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11831" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug where container image building would fail when specifying an output path that doesn't exist. The fix ensures the output directory is created before the docker/podman build process attempts to use it.
- Adds directory creation for the output path in the container image builder
- Updates test to verify the fix works with non-existent directories
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Aspire.Hosting/Publishing/ResourceContainerImageBuilder.cs | Adds Directory.CreateDirectory() call to ensure output path exists before building |
| tests/Aspire.Hosting.Tests/Publishing/ResourceContainerImageBuilderTests.cs | Updates test to use a non-existent directory path to verify the fix |
|
9.5.2? 😄 |
Sure. The customer who hit this is also the approver of servicing requests. 😆 |
|
/backport to release/9.5 |
|
Started backporting to release/9.5: https://github.com/dotnet/aspire/actions/runs/18317265173 |
When using docker/podman, and specifying an output path, building a docker image will fail if the directory isn't created. Ensure it is created.