17 lines
432 B
Docker
17 lines
432 B
Docker
|
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"]
|