continuity/Server/Dockerfile
renovate-bot e3e010d15e
All checks were successful
Build, Package and Push Images / preprocess (push) Successful in 3s
Build, Package and Push Images / build (push) Successful in 28s
Build, Package and Push Images / sonarqube (push) Has been skipped
Build, Package and Push Images / sbom-scan (push) Successful in 29s
Build, Package and Push Images / container-build (push) Successful in 1m9s
Build, Package and Push Images / container-sbom-scan (push) Successful in 34s
chore(deps): update mcr.microsoft.com/dotnet/sdk docker tag to v8
Signed-off-by: noreply@rainote.dev
2023-11-04 09:56:17 +00:00

18 lines
508 B
Docker

FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["Server/Server.csproj", "Server/"]
RUN dotnet restore "Server/Server.csproj"
COPY . .
WORKDIR "/src/Server"
RUN dotnet build "Server.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Server.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Server.dll"]