-
Notifications
You must be signed in to change notification settings - Fork 0
Containerize ASP.NET Core EasyQuery samples + upgrade analysis #43
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Build context = repo root (for nuget.config). See docker-compose.yml at repo root. | ||
| # `dotnet publish` runs `npm install && npm run build -- --prod` (Angular 12) via PublishRunWebpack. | ||
| # Angular 12 / webpack 5 builds on Node 16 (no --openssl-legacy-provider needed there). | ||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
| COPY --from=node:16-bullseye /usr/local/bin /usr/local/bin | ||
| COPY --from=node:16-bullseye /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
| WORKDIR /src | ||
| COPY nuget.config ./ | ||
| COPY ["AspNetCore/Angular/AdvancedSearch/", "app/"] | ||
| WORKDIR /src/app | ||
| RUN dotnet restore "EqDemo.Angular.AdvancedSearch.csproj" | ||
| RUN dotnet publish "EqDemo.Angular.AdvancedSearch.csproj" -c Release -o /out /p:UseAppHost=false | ||
|
|
||
| FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final | ||
| WORKDIR /app | ||
| COPY --from=build /out ./ | ||
| COPY ["AspNetCore/Angular/AdvancedSearch/App_Data/", "./App_Data/"] | ||
| ENV ASPNETCORE_URLS=http://+:8080 | ||
| ENV ASPNETCORE_ENVIRONMENT=Development | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["dotnet", "EqDemo.Angular.AdvancedSearch.dll"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Build context = repo root (for nuget.config). See docker-compose.yml at repo root. | ||
| # Blazor WebAssembly: the Server project also builds/hosts the Client (WASM) + Shared. | ||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
| WORKDIR /src | ||
| COPY nuget.config ./ | ||
| COPY ["AspNetCore/Blazor/AdHocReporting.BlazorWasm/", "app/"] | ||
| WORKDIR /src/app/Server | ||
| RUN dotnet restore "EqDemo.BlazorWasm.AdhocReporting.Server.csproj" | ||
| RUN dotnet publish "EqDemo.BlazorWasm.AdhocReporting.Server.csproj" -c Release -o /out /p:UseAppHost=false | ||
|
|
||
| FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS final | ||
| WORKDIR /app | ||
| COPY --from=build /out ./ | ||
| COPY ["AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/App_Data/", "./App_Data/"] | ||
| ENV ASPNETCORE_URLS=http://+:8080 | ||
| ENV ASPNETCORE_ENVIRONMENT=Development | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["dotnet", "EqDemo.BlazorWasm.AdhocReporting.Server.dll"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Build context = repo root (for nuget.config). See docker-compose.yml at repo root. | ||
| # net6.0 project built with the .NET 8 SDK; runs on the .NET 6 ASP.NET runtime. | ||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
| WORKDIR /src | ||
| COPY nuget.config ./ | ||
| COPY ["AspNetCore/Blazor/AdvancedSearch.BlazorServer/EqDemo.BlazorServer.AdvancedSearch.csproj", "app/"] | ||
| RUN dotnet restore "app/EqDemo.BlazorServer.AdvancedSearch.csproj" | ||
| COPY ["AspNetCore/Blazor/AdvancedSearch.BlazorServer/", "app/"] | ||
| WORKDIR /src/app | ||
| RUN dotnet publish "EqDemo.BlazorServer.AdvancedSearch.csproj" -c Release -o /out /p:UseAppHost=false | ||
|
|
||
| FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS final | ||
| WORKDIR /app | ||
| COPY --from=build /out ./ | ||
| COPY ["AspNetCore/Blazor/AdvancedSearch.BlazorServer/App_Data/", "./App_Data/"] | ||
| ENV ASPNETCORE_URLS=http://+:8080 | ||
| ENV ASPNETCORE_ENVIRONMENT=Development | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["dotnet", "EqDemo.BlazorServer.AdvancedSearch.dll"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Build context = repo root (for nuget.config). See docker-compose.yml at repo root. | ||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
| WORKDIR /src | ||
| COPY nuget.config ./ | ||
| COPY ["AspNetCore/Razor-Mvc/Mvc.DataFiltering/EqDemo.AspNetCoreMvc.DataFiltering.csproj", "app/"] | ||
| RUN dotnet restore "app/EqDemo.AspNetCoreMvc.DataFiltering.csproj" | ||
| COPY ["AspNetCore/Razor-Mvc/Mvc.DataFiltering/", "app/"] | ||
| WORKDIR /src/app | ||
| RUN dotnet publish "EqDemo.AspNetCoreMvc.DataFiltering.csproj" -c Release -o /out /p:UseAppHost=false | ||
|
|
||
| FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final | ||
| WORKDIR /app | ||
| COPY --from=build /out ./ | ||
| COPY ["AspNetCore/Razor-Mvc/Mvc.DataFiltering/App_Data/", "./App_Data/"] | ||
| ENV ASPNETCORE_URLS=http://+:8080 | ||
| ENV ASPNETCORE_ENVIRONMENT=Development | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["dotnet", "EqDemo.AspNetCoreMvc.DataFiltering.dll"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Build context = repo root (for nuget.config). See docker-compose.yml at repo root. | ||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
| WORKDIR /src | ||
| COPY nuget.config ./ | ||
| COPY ["AspNetCore/Razor-Mvc/Razor.AdHocReporting/EqDemo.AspNetCoreRazor.AdhocReporting.csproj", "app/"] | ||
| RUN dotnet restore "app/EqDemo.AspNetCoreRazor.AdhocReporting.csproj" | ||
| COPY ["AspNetCore/Razor-Mvc/Razor.AdHocReporting/", "app/"] | ||
| WORKDIR /src/app | ||
| RUN dotnet publish "EqDemo.AspNetCoreRazor.AdhocReporting.csproj" -c Release -o /out /p:UseAppHost=false | ||
|
|
||
| FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final | ||
| WORKDIR /app | ||
| COPY --from=build /out ./ | ||
| COPY ["AspNetCore/Razor-Mvc/Razor.AdHocReporting/App_Data/", "./App_Data/"] | ||
| ENV ASPNETCORE_URLS=http://+:8080 | ||
| ENV ASPNETCORE_ENVIRONMENT=Development | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["dotnet", "EqDemo.AspNetCoreRazor.AdhocReporting.dll"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Build context = repo root (for nuget.config). See docker-compose.yml at repo root. | ||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
| WORKDIR /src | ||
| COPY nuget.config ./ | ||
| COPY ["AspNetCore/Razor-Mvc/Razor.AdvancedSearch/EqDemo.AspNetCoreRazor.AdvancedSearch.csproj", "app/"] | ||
| RUN dotnet restore "app/EqDemo.AspNetCoreRazor.AdvancedSearch.csproj" | ||
| COPY ["AspNetCore/Razor-Mvc/Razor.AdvancedSearch/", "app/"] | ||
| WORKDIR /src/app | ||
| RUN dotnet publish "EqDemo.AspNetCoreRazor.AdvancedSearch.csproj" -c Release -o /out /p:UseAppHost=false | ||
|
|
||
| FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final | ||
| WORKDIR /app | ||
| COPY --from=build /out ./ | ||
| # App_Data (Northwind sample DB seed + query store) is not published by default. | ||
| COPY ["AspNetCore/Razor-Mvc/Razor.AdvancedSearch/App_Data/", "./App_Data/"] | ||
| ENV ASPNETCORE_URLS=http://+:8080 | ||
| ENV ASPNETCORE_ENVIRONMENT=Development | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["dotnet", "EqDemo.AspNetCoreRazor.AdvancedSearch.dll"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Build context = repo root (for nuget.config). See docker-compose.yml at repo root. | ||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
| WORKDIR /src | ||
| COPY nuget.config ./ | ||
| COPY ["AspNetCore/Razor-Mvc/Razor.DataFiltering/EqDemo.AspNetCoreRazor.DataFiltering.csproj", "app/"] | ||
| RUN dotnet restore "app/EqDemo.AspNetCoreRazor.DataFiltering.csproj" | ||
| COPY ["AspNetCore/Razor-Mvc/Razor.DataFiltering/", "app/"] | ||
| WORKDIR /src/app | ||
| RUN dotnet publish "EqDemo.AspNetCoreRazor.DataFiltering.csproj" -c Release -o /out /p:UseAppHost=false | ||
|
|
||
| FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final | ||
| WORKDIR /app | ||
| COPY --from=build /out ./ | ||
| COPY ["AspNetCore/Razor-Mvc/Razor.DataFiltering/App_Data/", "./App_Data/"] | ||
| ENV ASPNETCORE_URLS=http://+:8080 | ||
| ENV ASPNETCORE_ENVIRONMENT=Development | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["dotnet", "EqDemo.AspNetCoreRazor.DataFiltering.dll"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Build context = repo root (for nuget.config). See docker-compose.yml at repo root. | ||
| # `dotnet build` runs `npm install && npm run build` (Rollup 4) via a PreBuild target. | ||
| # Rollup 4 requires Node 18+. | ||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
| COPY --from=node:20-bookworm-slim /usr/local/bin /usr/local/bin | ||
| COPY --from=node:20-bookworm-slim /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
| WORKDIR /src | ||
| COPY nuget.config ./ | ||
| COPY ["AspNetCore/Razor-Mvc/RazorTypeScript.AdHocReporting/", "app/"] | ||
| WORKDIR /src/app | ||
| RUN dotnet restore "EqDemo.AspNetCoreRazorTypeScript.AdhocReporting.csproj" | ||
| RUN dotnet publish "EqDemo.AspNetCoreRazorTypeScript.AdhocReporting.csproj" -c Release -o /out /p:UseAppHost=false | ||
|
|
||
| FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final | ||
| WORKDIR /app | ||
| COPY --from=build /out ./ | ||
| COPY ["AspNetCore/Razor-Mvc/RazorTypeScript.AdHocReporting/App_Data/", "./App_Data/"] | ||
| ENV ASPNETCORE_URLS=http://+:8080 | ||
| ENV ASPNETCORE_ENVIRONMENT=Development | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["dotnet", "EqDemo.AspNetCoreRazorTypeScript.AdhocReporting.dll"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Build context = repo root (for nuget.config). See docker-compose.yml at repo root. | ||
| # SPA project: `dotnet publish` runs `npm install && npm run build` (CRA) via an MSBuild target, | ||
| # so the build stage needs Node. The legacy toolchain (react-scripts) builds cleanly on Node 16. | ||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
| # Bring Node 16 into the .NET SDK image. | ||
| COPY --from=node:16-bullseye /usr/local/bin /usr/local/bin | ||
| COPY --from=node:16-bullseye /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
| WORKDIR /src | ||
| COPY nuget.config ./ | ||
| COPY ["AspNetCore/React/AdvancedSearch/", "app/"] | ||
| WORKDIR /src/app | ||
| RUN dotnet restore "EqDemo.AspNetCoreReact.AdvancedSearch.csproj" | ||
| RUN dotnet publish "EqDemo.AspNetCoreReact.AdvancedSearch.csproj" -c Release -o /out /p:UseAppHost=false | ||
|
|
||
| FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS final | ||
| WORKDIR /app | ||
| COPY --from=build /out ./ | ||
| COPY ["AspNetCore/React/AdvancedSearch/App_Data/", "./App_Data/"] | ||
| ENV ASPNETCORE_URLS=http://+:8080 | ||
| ENV ASPNETCORE_ENVIRONMENT=Development | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["dotnet", "EqDemo.AspNetCoreReact.AdvancedSearch.dll"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Build context = repo root (for nuget.config). See docker-compose.yml at repo root. | ||
| # `dotnet publish` runs `npm install && npm run build` (Stencil 2) via PublishRunWebpack. | ||
| # Stencil 2 builds on Node 16. | ||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
| COPY --from=node:16-bullseye /usr/local/bin /usr/local/bin | ||
| COPY --from=node:16-bullseye /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
| WORKDIR /src | ||
| COPY nuget.config ./ | ||
| COPY ["AspNetCore/Stencil/AdvancedSearch/", "app/"] | ||
| WORKDIR /src/app | ||
| RUN dotnet restore "EqDemo.AspNetCoreStencil.AdvancedSearch.csproj" | ||
| RUN dotnet publish "EqDemo.AspNetCoreStencil.AdvancedSearch.csproj" -c Release -o /out /p:UseAppHost=false | ||
|
|
||
| FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS final | ||
| WORKDIR /app | ||
| COPY --from=build /out ./ | ||
| COPY ["AspNetCore/Stencil/AdvancedSearch/App_Data/", "./App_Data/"] | ||
| ENV ASPNETCORE_URLS=http://+:8080 | ||
| ENV ASPNETCORE_ENVIRONMENT=Development | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["dotnet", "EqDemo.AspNetCoreStencil.AdvancedSearch.dll"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Build context = repo root (for nuget.config). See docker-compose.yml at repo root. | ||
| # `dotnet publish` runs `npm install && npm run build` (Vue CLI 3) via PublishRunWebpack. | ||
| # Vue CLI 3 builds on Node 16. | ||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
| COPY --from=node:16-bullseye /usr/local/bin /usr/local/bin | ||
| COPY --from=node:16-bullseye /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
| WORKDIR /src | ||
| COPY nuget.config ./ | ||
| COPY ["AspNetCore/Vue2/AdvancedSearch/", "app/"] | ||
| WORKDIR /src/app | ||
| RUN dotnet restore "EqDemo.AspNetCoreVue2.AdvancedSearch.csproj" | ||
| RUN dotnet publish "EqDemo.AspNetCoreVue2.AdvancedSearch.csproj" -c Release -o /out /p:UseAppHost=false | ||
|
|
||
| FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS final | ||
| WORKDIR /app | ||
| COPY --from=build /out ./ | ||
| COPY ["AspNetCore/Vue2/AdvancedSearch/App_Data/", "./App_Data/"] | ||
| ENV ASPNETCORE_URLS=http://+:8080 | ||
| ENV ASPNETCORE_ENVIRONMENT=Development | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["dotnet", "EqDemo.AspNetCoreVue2.AdvancedSearch.dll"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # DotNetSamples — Containerization & Upgrade Notes | ||
|
|
||
| This document records (1) how the samples were containerized and (2) concrete upgrade | ||
| opportunities found while building them. All findings below were observed by actually | ||
| building/running the projects in containers, not inferred from code alone. | ||
|
|
||
| ## 1. Containerization | ||
|
|
||
| Added a multi-stage `Dockerfile` per Linux-runnable ASP.NET Core project and a root | ||
| `docker-compose.yml`. Each app self-seeds a SQLite Northwind database on first start | ||
| from `App_Data/EqDemoData.zip`, so **no external database is required**. | ||
|
|
||
| ```bash | ||
| docker compose up -d --build # 8 working services | ||
| docker compose --profile needs-upgrade up -d --build # also try legacy SPA samples | ||
| ``` | ||
|
|
||
| | Port | Service | TFM | Runtime image | Status | | ||
| |------|---------|-----|---------------|--------| | ||
| | 8001 | razor-advancedsearch | net8.0 | aspnet:8.0 | ✅ HTTP 200 | | ||
| | 8002 | razor-adhocreporting | net8.0 | aspnet:8.0 | ✅ 200 (login at `/Identity/Account/Login`) | | ||
| | 8003 | razor-datafiltering | net8.0 | aspnet:8.0 | ✅ HTTP 200 | | ||
| | 8004 | mvc-datafiltering | net8.0 | aspnet:8.0 | ✅ HTTP 200 | | ||
| | 8005 | blazor-server | net6.0 | aspnet:6.0 | ✅ HTTP 200 | | ||
| | 8006 | blazor-wasm | net6.0 | aspnet:6.0 | ✅ HTTP 200 | | ||
| | 8007 | angular-advancedsearch | net8.0 + Angular 12 | aspnet:8.0 | ✅ HTTP 200 (client built on Node 16) | | ||
| | 8013 | razor-ts-adhocreporting | net8.0 + Rollup 4 | aspnet:8.0 | ✅ HTTP 200 (client built on Node 20) | | ||
| | 8009 | vue2-advancedsearch | net6.0 + Vue CLI 3 | — | ❌ build fails (see §3) | | ||
| | 8011 | react-advancedsearch | net6.0 + react-scripts 1.x | — | ❌ build fails (see §3) | | ||
| | 8012 | stencil-advancedsearch | net6.0 + Stencil 2 | — | ❌ build fails (see §3) | | ||
|
|
||
| **Not containerized (Windows-only — cannot run in Linux containers):** | ||
| - `AspNet4/` (ASP.NET MVC 5 + WebForms, .NET Framework 4.x) | ||
| - `WinForms/`, `Wpf/` (.NET Framework 4.x and `net6.0-windows`) | ||
| - `AspNetCore/Vue3` and `AspNetCore/Angular/AdHocReporting` use a legacy Visual Studio | ||
| JavaScript project (`.esproj` + `Microsoft.AspNetCore.SpaProxy`) whose build is tied to | ||
| the VS JS SDK / dev-server proxy; they need a Node-build refactor before they containerize | ||
| cleanly (see §3). | ||
|
|
||
| ## 2. .NET / NuGet upgrades | ||
|
|
||
| ### 2.1 Target framework | ||
| - **`net6.0` reached end-of-life on 2024-11-12.** These projects should move to **`net8.0` | ||
| (LTS, supported to 2026-11)** or `net9.0`: | ||
| `Blazor/AdvancedSearch.BlazorServer`, `Blazor/AdHocReporting.BlazorWasm/*`, | ||
| `Vue2`, `Vue3`, `React`, `Stencil`. | ||
| Moving them to `net8.0` also lets their containers use the supported `aspnet:8.0` base | ||
| image instead of the EOL `aspnet:6.0`. | ||
| - `WinForms/EqDemoWinFormsNet6` and `Wpf/EqDemoWpfNet6` target `net6.0-windows` → bump to | ||
| `net8.0-windows`. | ||
| - The `net8.0` projects (all `Razor-Mvc/*`, both Angular) are current. | ||
|
|
||
| ### 2.2 NuGet version drift (inconsistent across the repo) | ||
| Microsoft framework packages are pinned at a mix of `6.0.1`, `8.0.2`, `8.0.4`, `8.0.5`. | ||
| Align every project on the **latest 8.0.x patch**, e.g.: | ||
| - `Microsoft.AspNetCore.Identity.EntityFrameworkCore`, `Microsoft.AspNetCore.Identity.UI` | ||
| - `Microsoft.EntityFrameworkCore.Sqlite` / `.SqlServer` / `.Tools` | ||
| - `Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore` | ||
|
|
||
| ### 2.3 Old packages with known-CVE history (prioritize) | ||
| - `Microsoft.Data.SqlClient` **2.1.7** (React sample) → align to **5.2.x** (used elsewhere). | ||
| - `System.Data.SqlClient` **4.8.6** → legacy; replace with `Microsoft.Data.SqlClient`. | ||
| - `System.Net.Http` **4.3.4** → remove (provided by the framework) or update. | ||
| - `System.Text.RegularExpressions` **4.3.1** → remove/update (ReDoS-era package). | ||
| - `System.Drawing.Common` **4.7.2 / 4.7.3** → update to **8.0.x**; note it is unsupported on | ||
| non-Windows since .NET 6 (PdfSharp/ClosedXML exporters rely on it). | ||
|
|
||
| ### 2.4 EasyQuery / Korzh packages (latest stable on NuGet) | ||
| - `Korzh.EasyQuery.*` **7.4.0** → **7.4.2** | ||
| - `EasyData.Exporters.*` **1.5.8 / 1.5.9** → **1.5.12** | ||
| - `Korzh.DbUtils.*` mixed **1.4.1 / 1.4.3** → align on **1.4.3** | ||
| - `AspNet4` projects still reference `7.4.0-rc04` prerelease → move to stable `7.4.0`/`7.4.2`. | ||
|
|
||
| ## 3. Front-end toolchain upgrades (block SPA containerization) | ||
|
|
||
| | Sample | Tool (current) | Failure when building | Recommended upgrade | | ||
| |--------|----------------|-----------------------|---------------------| | ||
| | React | `react-scripts ^1.1.5` (2018) | `Failed to minify` on `@easydata/core` ESM | `react-scripts` 5.x, or migrate to **Vite** | | ||
| | Vue2 | `@vue/cli-service ^3`, Vue 2 (EOL), TS 3.4 | TS `strictPropertyInitialization` errors (`Property 'context' has no initializer`) | Migrate to **Vue 3 + Vite**, TS 5 | | ||
| | Stencil | `@stencil/core ^2` | prerender hydration crash during `stencil build --prerender` | **Stencil 4** | | ||
| | Angular (adv. search) | Angular 12 | builds only on **Node 16** (needs `--openssl-legacy-provider` on newer Node) | **Angular 17/18** to build on Node 20+ | | ||
| | Vue3 / Angular-AdHoc | `.esproj` + `Microsoft.AspNetCore.SpaProxy` | VS JavaScript-project build, dev-server proxy | replace with a plain Node build step invoked from the `.csproj` (like the other SPA samples) so it builds headless in CI/containers | | ||
|
|
||
| ## 4. Other observations | ||
| - No `global.json` — builds float to whatever SDK is installed. Consider pinning the SDK. | ||
| - Containers log `Failed to determine the https port for redirect` because only HTTP is | ||
| exposed. Harmless for the demo; for production, terminate TLS at a reverse proxy. | ||
| - `App_Data/` content (sample DB seed zip, saved-query JSON) is **not** published by default; | ||
| the Dockerfiles copy it explicitly into the image. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # Spins up the cross-platform ASP.NET Core EasyQuery samples in Linux containers. | ||
| # Each app self-seeds a SQLite database (Northwind) on first start from App_Data/EqDemoData.zip. | ||
| # | ||
| # Windows-only families (AspNet4 MVC/WebForms, WinForms, WPF) are NOT included here: | ||
| # they target .NET Framework / net*-windows and cannot run in Linux containers. | ||
| # | ||
| # Usage: | ||
| # docker compose up -d --build # the 8 working services below | ||
| # docker compose --profile needs-upgrade up -d --build # also try the legacy SPA samples | ||
| # | ||
| # Service / port map: | ||
| # 8001 razor-advancedsearch 8005 blazor-server | ||
| # 8002 razor-adhocreporting 8006 blazor-wasm | ||
| # 8003 razor-datafiltering 8007 angular-advancedsearch | ||
| # 8004 mvc-datafiltering 8013 razor-ts-adhocreporting | ||
|
|
||
| services: | ||
| # ============ Working services (default) ============ | ||
|
|
||
| # ---- Pure ASP.NET Core (no Node build) ---- | ||
| razor-advancedsearch: # net8.0 | ||
| build: { context: ., dockerfile: AspNetCore/Razor-Mvc/Razor.AdvancedSearch/Dockerfile } | ||
| ports: ["8001:8080"] | ||
|
|
||
| razor-adhocreporting: # net8.0 (login required: /Identity/Account/Login) | ||
| build: { context: ., dockerfile: AspNetCore/Razor-Mvc/Razor.AdHocReporting/Dockerfile } | ||
| ports: ["8002:8080"] | ||
|
|
||
| razor-datafiltering: # net8.0 | ||
| build: { context: ., dockerfile: AspNetCore/Razor-Mvc/Razor.DataFiltering/Dockerfile } | ||
| ports: ["8003:8080"] | ||
|
|
||
| mvc-datafiltering: # net8.0 | ||
| build: { context: ., dockerfile: AspNetCore/Razor-Mvc/Mvc.DataFiltering/Dockerfile } | ||
| ports: ["8004:8080"] | ||
|
|
||
| blazor-server: # net6.0 (EOL) -> runs on aspnet:6.0 | ||
| build: { context: ., dockerfile: AspNetCore/Blazor/AdvancedSearch.BlazorServer/Dockerfile } | ||
| ports: ["8005:8080"] | ||
|
|
||
| blazor-wasm: # net6.0 (EOL) -> runs on aspnet:6.0 | ||
| build: { context: ., dockerfile: AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Dockerfile } | ||
| ports: ["8006:8080"] | ||
|
|
||
| # ---- SPA-backed that build cleanly ---- | ||
| angular-advancedsearch: # net8.0 + Angular 12 (built on Node 16) | ||
| build: { context: ., dockerfile: AspNetCore/Angular/AdvancedSearch/Dockerfile } | ||
| ports: ["8007:8080"] | ||
|
|
||
| razor-ts-adhocreporting: # net8.0 + TypeScript/Rollup 4 (built on Node 20) | ||
| build: { context: ., dockerfile: AspNetCore/Razor-Mvc/RazorTypeScript.AdHocReporting/Dockerfile } | ||
| ports: ["8013:8080"] | ||
|
Comment on lines
+25
to
+52
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Linux AdHoc containers miss the seeded reports because the app looks for a backslash path The default compose stack now advertises the AdHoc Reporting containers as working services, but these apps run on Linux while their Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback. Debug
Comment on lines
+17
to
+52
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚩 Running default containers as Development is mostly intentional for these demos but has side effects Most non-SPA and Angular/Blazor containers set Was this helpful? React with 👍 or 👎 to provide feedback. Debug |
||
|
|
||
| # ============ Legacy SPA samples (opt-in: --profile needs-upgrade) ============ | ||
| # These currently FAIL to build because of obsolete front-end toolchains. | ||
| # See UPGRADES.md for the specific failure and the recommended upgrade. | ||
|
|
||
| react-advancedsearch: # net6.0 + react-scripts ^1.1.5 (fails: "Failed to minify") | ||
| profiles: ["needs-upgrade"] | ||
| build: { context: ., dockerfile: AspNetCore/React/AdvancedSearch/Dockerfile } | ||
| ports: ["8011:8080"] | ||
|
|
||
| vue2-advancedsearch: # net6.0 + @vue/cli-service ^3 (fails: TS strict init errors) | ||
| profiles: ["needs-upgrade"] | ||
| build: { context: ., dockerfile: AspNetCore/Vue2/AdvancedSearch/Dockerfile } | ||
| ports: ["8009:8080"] | ||
|
|
||
| stencil-advancedsearch: # net6.0 + @stencil/core ^2 (fails: prerender hydration error) | ||
| profiles: ["needs-upgrade"] | ||
| build: { context: ., dockerfile: AspNetCore/Stencil/AdvancedSearch/Dockerfile } | ||
| ports: ["8012:8080"] | ||
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.
🟡 Profile SPA images run the published apps in Development and try to start missing dev servers
The profile-only React image sets
ASPNETCORE_ENVIRONMENT=Development, but its published final stage contains only/outplusApp_Dataand does not include Node or theClientAppsource. In Development,Startup.ConfigureskipsUseSpaStaticFiles()and callsspa.UseReactDevelopmentServer(...)(AspNetCore/React/AdvancedSearch/Startup.cs:80-114), so if this container ever builds successfully, UI requests will try to launch a dev server from the runtime image instead of serving the published SPA and will fail. The same Development-mode dev-server path is present in the Vue2 and Stencil profile Dockerfiles viaspa.UseVueCli(...)andspa.UseProxyToSpaDevelopmentServer(...)(AspNetCore/Vue2/AdvancedSearch/Startup.cs:79-120,AspNetCore/Stencil/AdvancedSearch/Startup.cs:77-119).Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
Playground