File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 1+ # Use the official .NET 8.0 runtime as a base image
2+ FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
3+ WORKDIR /app
4+ EXPOSE 80
5+ EXPOSE 443
6+
7+ # Use the official .NET 8.0 SDK as a build image
18FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
29WORKDIR /src
3-
410COPY ["TableBooking.Api/TableBooking.Api.csproj" , "TableBooking.Api/" ]
511COPY ["TableBooking.Logic/TableBooking.Logic.csproj" , "TableBooking.Logic/" ]
612COPY ["TableBooking.Model/TableBooking.Model.csproj" , "TableBooking.Model/" ]
713RUN dotnet restore "TableBooking.Api/TableBooking.Api.csproj"
8-
914COPY . .
1015WORKDIR "/src/TableBooking.Api"
1116RUN dotnet build "TableBooking.Api.csproj" -c Release -o /app/build
1217
18+ # Publish the application
1319FROM build AS publish
1420RUN dotnet publish "TableBooking.Api.csproj" -c Release -o /app/publish /p:UseAppHost=false
1521
16- FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
22+ # Final stage: use the runtime image
23+ FROM base AS final
1724WORKDIR /app
1825COPY --from=publish /app/publish .
19- EXPOSE 80
20- EXPOSE 443
2126ENTRYPOINT ["dotnet" , "TableBooking.Api.dll" ]
You can’t perform that action at this time.
0 commit comments