Add Blazor gateway container image - #7314
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
0449f75 to
84f49c8
Compare
| "aspnet|11.0|build-version": "11.0.0-preview.7.26381.103", | ||
| "aspnet-composite|11.0|build-version": "$(aspnet|11.0|build-version)", | ||
|
|
||
| "blazor-gateway|11.0|build-version": "11.0.0-preview.7.26381.103", |
There was a problem hiding this comment.
Is it always the same version as aspnet, and always ships with aspnet (from the VMR)? If so, we can just re-use the version.
| * `ClientApps` — the set of Blazor applications the gateway serves, including each application's endpoints manifest location and path prefix. | ||
| * `ReverseProxy` — standard [YARP](https://aka.ms/YarpDocumentation) reverse-proxy routes and clusters, used to proxy requests to backend APIs alongside the Blazor application(s). | ||
| * Service discovery — the gateway uses [.NET service discovery](https://learn.microsoft.com/dotnet/core/extensions/service-discovery) to resolve destination addresses for reverse-proxy clusters. | ||
| * `Gateway` — gateway-level settings. |
There was a problem hiding this comment.
| * `ClientApps` — the set of Blazor applications the gateway serves, including each application's endpoints manifest location and path prefix. | |
| * `ReverseProxy` — standard [YARP](https://aka.ms/YarpDocumentation) reverse-proxy routes and clusters, used to proxy requests to backend APIs alongside the Blazor application(s). | |
| * Service discovery — the gateway uses [.NET service discovery](https://learn.microsoft.com/dotnet/core/extensions/service-discovery) to resolve destination addresses for reverse-proxy clusters. | |
| * `Gateway` — gateway-level settings. | |
| * `ClientApps`: the set of Blazor applications the gateway serves, including each application's endpoints manifest location and path prefix. | |
| * `ReverseProxy`: standard [YARP](https://aka.ms/YarpDocumentation) reverse-proxy routes and clusters, used to proxy requests to backend APIs alongside the Blazor application(s). | |
| * Service discovery: the gateway uses [.NET service discovery](https://learn.microsoft.com/dotnet/core/extensions/service-discovery) to resolve destination addresses for reverse-proxy clusters. | |
| * `Gateway`: gateway-level settings. |
| docker run --rm -p 8080:8080 \ | ||
| -v $(pwd)/myapp/wwwroot:/app/wwwroot:ro \ | ||
| -v $(pwd)/myapp/MyApp.staticwebassets.endpoints.json:/app/myapp.endpoints.json:ro \ | ||
| -e ClientApps__myapp__EndpointsManifest=/app/myapp.endpoints.json \ | ||
| -e ClientApps__myapp__PathPrefix= \ | ||
| {{FULL_REPO}}:{{if VARIABLES["branch"] = "nightly":11.0-preview^else:latest}} |
There was a problem hiding this comment.
This is a really strange way to recommend deploying an app. I don't suspect many users will actually deploy their app this way.
I think most would expect to build a Dockerfile, push it somewhere, and then deploy that.
| @@ -0,0 +1,35 @@ | |||
| ARG REPO=mcr.microsoft.com/dotnet/aspnet | |||
There was a problem hiding this comment.
The gateway is supposed to be "an optimized host for deploying standalone Blazor apps". Yet it includes the whole ASP.NET Runtime. Can it be a Native AOT app instead?
I, as a user, do not understand why I should use the gateway over building my app with Yarp and app.UseStaticFiles() in my own Dockerfile. Or just nginx.
| RUN gateway_version=0.0.0 \ | ||
| && curl --fail --show-error --location --output blazor_gateway.nupkg https://globalcdn.nuget.org/packages/microsoft.aspnetcore.components.gateway.cli.$gateway_version.nupkg \ | ||
| && blazor_gateway_sha512='{sha512_placeholder}' \ |
There was a problem hiding this comment.
When ASP.NET or Blazor gateway has security fixes, how do we get an internal pre-release version of the gateway?
| blazor-gateway/ @dotnet/dotnet-docker-reviewers | ||
| *blazor-gateway* @dotnet/dotnet-docker-reviewers | ||
| *Blazor-Gateway* @dotnet/dotnet-docker-reviewers |
|
|
||
| ```bash | ||
| docker run --rm -p 8080:8080 \ | ||
| -v $(pwd)/myapp/wwwroot:/app/wwwroot:ro \ |
There was a problem hiding this comment.
Using $(pwd) like this doesn't work on Windows/PowerShell.
Summary
mcr.microsoft.com/dotnet/nightly/blazor-gatewayfor .NET 11 preview on Azure Linux 3.0 distroless amd64 and arm64Microsoft.AspNetCore.Components.Gateway.Cli, retaining only the runtime payload and third-party noticesStable
mcr.microsoft.com/dotnet/blazor-gatewaypublication is intentionally deferred until .NET 11 RTM.Validation
pwsh -NoProfile ./tests/run-tests.ps1 -paths '*blazor-gateway*' -TestCategories @('pre-build')(159 passed)pwsh -NoProfile ./build-and-test.ps1 -mode 'Build' -paths '*blazor-gateway*'pwsh -NoProfile ./tests/run-tests.ps1 -paths '*blazor-gateway*' -TestCategories @('blazor-gateway')(6 passed)linux/arm64Docker build against the nightly ASP.NET base