summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 183e8d9510ffe79c0761fffb2aa04e2bb47e02e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /app

COPY . ./
RUN dotnet restore
RUN dotnet tool restore
RUN dotnet libman restore
RUN dotnet ef database update --context DataContext
RUN dotnet ef database update --context IdentityContext

RUN dotnet publish -c Release -o out

FROM mcr.microsoft.com/dotnet/aspnet:6.0
EXPOSE 5000
WORKDIR /app
COPY  --from=build /app/out .
COPY --from=build /app/Database ./Database
ENV ASPNETCORE_ENVIRONMENT Production
ENTRYPOINT [ "dotnet", "MyDarling.dll", "--urls=http://0.0.0.0:5000" ]