File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/Application/src/RazorPagesTestSample Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Use the official .NET SDK image as a build environment
2
+ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
3
+ WORKDIR /app
4
+
5
+ # Copy the .csproj file and restore dependencies
6
+ COPY src/Application/src/RazorPagesTestSample/RazorPagesTestSample.csproj ./
7
+ RUN dotnet restore
8
+
9
+ # Copy the entire project and build the release version
10
+ COPY src/Application/src/RazorPagesTestSample/. ./
11
+ RUN dotnet publish -c Release -o out
12
+
13
+ # Use the official ASP.NET Core runtime image
14
+ FROM mcr.microsoft.com/dotnet/aspnet:8.0
15
+ WORKDIR /app
16
+ COPY --from=build-env /app/out .
17
+ # Default ASP.NET port changed with .NET 8.0
18
+ ENV ASPNETCORE_HTTP_PORTS=80
19
+ ENTRYPOINT ["dotnet" , "RazorPagesTestSample.dll" ]
You can’t perform that action at this time.
0 commit comments