You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
leap-hit-server/code/server/Dockerfile

23 lines
654 B

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["ApiLeapHit/ApiLeapHit.csproj", "ApiLeapHit/"]
COPY ["DTO/DTO.csproj", "DTO/"]
COPY ["DataBase/DataBase.csproj", "DataBase/"]
RUN dotnet restore "ApiLeapHit/ApiLeapHit.csproj"
COPY . .
WORKDIR "/src/ApiLeapHit"
RUN dotnet build "ApiLeapHit.csproj" -c Release -o /app/build
RUN rm -rf /root/.nuget/packages/*
FROM build AS publish
RUN dotnet publish "ApiLeapHit.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "ApiLeapHit.dll"]