This commit is contained in:
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
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"]
|
Reference in New Issue
Block a user