From f2995ff1569560e7732b8d95cbaea4a5ec6fe09b Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Fri, 23 Jun 2023 20:19:31 -0700 Subject: [PATCH] docker will now build the migration bundle --- Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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