OD.WebApplication/Dockerfile

17 lines
432 B
Docker
Raw Normal View History

2020-07-13 01:53:25 +00:00
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app
COPY *.sln ./
COPY OD.WebApplication/*.csproj OD.WebApplication/
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o out --no-restore
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 as base
WORKDIR /app
ENV ASPNETCORE_ENVIRONMENT=Production
COPY --from=build-env /app/out .
RUN mkdir -p logs
EXPOSE 80 443
ENTRYPOINT ["dotnet", "OD.WebApplication.dll"]