File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
2+ WORKDIR /src
3+
4+ # copy solution and project files
5+ COPY ["PayrollEngine.WebApp.sln" , "./" ]
6+ COPY ["Core/PayrollEngine.WebApp.Core.csproj" , "Core/" ]
7+ COPY ["Presentation/PayrollEngine.WebApp.Presentation.csproj" , "Presentation/" ]
8+ COPY ["Server/PayrollEngine.WebApp.Server.csproj" , "Server/" ]
9+ COPY ["Shared/PayrollEngine.WebApp.Shared.csproj" , "Shared/" ]
10+ COPY ["ViewModel/PayrollEngine.WebApp.ViewModel.csproj" , "ViewModel/" ]
11+
12+ # copy Directory.Build.props
13+ COPY ["Directory.Build.props" , "./" ]
14+
15+ RUN dotnet restore "PayrollEngine.WebApp.sln"
16+
17+ # copy everything else
18+ COPY . .
19+ WORKDIR "/src/Server"
20+ RUN dotnet publish "PayrollEngine.WebApp.Server.csproj" -c Release -o /app/publish --no-restore
21+
22+ # final stage
23+ FROM mcr.microsoft.com/dotnet/aspnet:8.0
24+ WORKDIR /app
25+ COPY --from=build /app/publish .
26+ ENTRYPOINT ["dotnet" , "PayrollEngine.WebApp.Server.dll" ]
You can’t perform that action at this time.
0 commit comments