Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
When using WithBuildArg(...)
in an Aspire project to pass build-time variables, the arguments are not forwarded to docker build. This causes missing environment values at build-time.
Expected Behavior
Build arguments set via WithBuildArg
should be forwarded to the docker build command using --build-arg KEY=VALUE.
Steps To Reproduce
Steps to reproduce the behavior:
- Use
.WithBuildArg("MY_ARG", "value")
on a container resource. - Run
aspire publish
- Observe that docker build does not include
--build-arg MY_ARG=value
DockerContainerRuntime.cs — RunDockerBuildAsync does not currently include logic to forward build args.
Exceptions (if any)
No response
.NET Version info
.NET SDK:
Version: 9.0.101
Commit: eedb237549
Workload version: 9.0.100-manifests.4a280210
MSBuild version: 17.12.12+1cce77968
Anything else?
.NET SDK:
Version: 9.0.101
Commit: eedb237549
Workload version: 9.0.100-manifests.4a280210
MSBuild version: 17.12.12+1cce77968