-
Notifications
You must be signed in to change notification settings - Fork 816
Open
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesIssues pertaining to Aspire Integrations packagesjavascriptPull requests that update Javascript codePull requests that update Javascript code
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
If we have a Node app with build script that output to a specific folder (e.g. dist, .output ...):
var webClient = builder.AddNodeApp("webclient", "../WebClient", ".output/server/index.mjs")
.WithRunScript("dev")
.WithBuildScript("build");It will deploy with all source files.
This happens cause the default Dockerfile builder has no info about the build output, so it copies everything to the runtime image:
| .CopyFrom("build", "/app", "/app") |
which result in a large container with source files, node_modules and dev dependencies that are not needed in runtime.
Describe the solution you'd like
Add new build output annotation that can be used by the default Dockerfile builder to determine which files need to be copied to the runtime image.
var webClient = builder.AddNodeApp("webclient", "../WebClient", ".output/server/index.mjs")
.WithRunScript("dev")
.WithBuildScript("build", outputFiles: [".output"]);The alternative solution is for the user to use a custom Dockerfile in the Node app folder.
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesIssues pertaining to Aspire Integrations packagesjavascriptPull requests that update Javascript codePull requests that update Javascript code