0
0
MyDarling/Dockerfile

19 lines
534 B
Docker
Raw Normal View History

2023-02-02 08:17:17 +03:00
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /app
COPY . ./
RUN dotnet restore
RUN dotnet tool restore
2023-02-10 08:03:29 +03:00
RUN dotnet libman restore
2023-03-10 07:43:00 +03:00
RUN dotnet ef database update --context DataContext
RUN dotnet ef database update --context IdentityContext
2023-02-02 08:17:17 +03:00
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:6.0
EXPOSE 5000
WORKDIR /app
COPY --from=build /app/out .
2023-03-10 07:43:00 +03:00
COPY --from=build /app/Database ./Database
2023-02-02 08:17:17 +03:00
ENV ASPNETCORE_ENVIRONMENT Production
ENTRYPOINT [ "dotnet", "MyDarling.dll", "--urls=http://0.0.0.0:5000" ]