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