We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3e89a3 commit 5099c7bCopy full SHA for 5099c7b
src/Application/src/Dockerfile
@@ -0,0 +1,27 @@
1
+# Use the official .NET 8 SDK image as a build stage
2
+FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
3
+
4
+# Set the working directory
5
+WORKDIR /app
6
7
+# Copy the project file and restore dependencies
8
+COPY *.csproj ./
9
+RUN dotnet restore
10
11
+# Copy the rest of the application code
12
+COPY . ./
13
14
+# Build the application
15
+RUN dotnet publish -c Release -o out
16
17
+# Use the official .NET 8 runtime image as a runtime stage
18
+FROM mcr.microsoft.com/dotnet/aspnet:8.0
19
20
21
22
23
+# Copy the built application from the build stage
24
+COPY --from=build /app/out .
25
26
+# Set the entry point for the application
27
+ENTRYPOINT ["dotnet", "RazorPagesTestSample.dll"]
0 commit comments