generated from dotnet/new-repo
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
Milestone
Description
Currently users that containerize a standard blazorwasm .NET SDK template end up with something unrunnable - because this style of application is compiled to WASM and then intended to be run from a browser, our defaults are all wrong.
We should detect (or allow the user to tell us) that they want to serve static content and then specify or infer
- an image to act as an http server
- the root to serve data from
I was able to make this work today with the busybox image, which includes an http server in it, using the following configuration:
<PropertyGroup>
<ContainerBaseImage>localhost:5010/library/busybox:1.35</ContainerBaseImage>
</PropertyGroup>
<ItemGroup>
<ContainerEntrypoint Include="busybox;httpd;-f;-v;-p;80;-h;./wwwroot" />
</ItemGroup>The main annoyance is that you can't change the working directory directly to wwwroot because we copy the publish contents to the working directory by default, so the relative host directory of the app had to be changed via CLI argument.
IEvangelist, Xeio and hwoodiwiss
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Tracking