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-02-02 08:17:17 +03:00
|
|
|
RUN dotnet ef database update
|
|
|
|
RUN dotnet publish -c Release -o out
|
|
|
|
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0
|
|
|
|
EXPOSE 5000
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=build /app/out .
|
|
|
|
ENV ASPNETCORE_ENVIRONMENT Production
|
|
|
|
ENTRYPOINT [ "dotnet", "MyDarling.dll", "--urls=http://0.0.0.0:5000" ]
|