diff --git a/Dockerfile b/Dockerfile index ab3e3ce..7427653 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,21 +14,20 @@ FROM build AS publish RUN dotnet publish -c Release -o /app/publish RUN dotnet publish -o build -#--self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true RUN ls build +FROM build as ef +RUN dotnet tool install dotnet-ef --tool-path /usr/bin +RUN dotnet ef migrations bundle --project "Newsbot.Collector.Database" + FROM mcr.microsoft.com/dotnet/aspnet:7.0.3 as app ENV ASPNETCORE_URLS=http://*:5000 ENV DOTNET_URLS=http://*:5000 -#RUN apt-get install chromium -y - WORKDIR /app -#RUN mkdir /migrations COPY --from=publish /app/build /app -#COPY --from=build ./app/Newsbot.Collector.Database/Migrations /app/migrations -#COPY --from=goose /go/bin/goose /app +COPY --from=ef /app/efbundle /app CMD [ "dotnet", "Newsbot.Collector.Api.dll" ] \ No newline at end of file