docker will now build the migration bundle
This commit is contained in:
parent
a6ea89be62
commit
f2995ff156
11
Dockerfile
11
Dockerfile
@ -14,21 +14,20 @@ FROM build AS publish
|
|||||||
RUN dotnet publish -c Release -o /app/publish
|
RUN dotnet publish -c Release -o /app/publish
|
||||||
|
|
||||||
RUN dotnet publish -o build
|
RUN dotnet publish -o build
|
||||||
#--self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
|
|
||||||
RUN ls build
|
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
|
FROM mcr.microsoft.com/dotnet/aspnet:7.0.3 as app
|
||||||
|
|
||||||
ENV ASPNETCORE_URLS=http://*:5000
|
ENV ASPNETCORE_URLS=http://*:5000
|
||||||
ENV DOTNET_URLS=http://*:5000
|
ENV DOTNET_URLS=http://*:5000
|
||||||
|
|
||||||
#RUN apt-get install chromium -y
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
#RUN mkdir /migrations
|
|
||||||
COPY --from=publish /app/build /app
|
COPY --from=publish /app/build /app
|
||||||
#COPY --from=build ./app/Newsbot.Collector.Database/Migrations /app/migrations
|
COPY --from=ef /app/efbundle /app
|
||||||
#COPY --from=goose /go/bin/goose /app
|
|
||||||
|
|
||||||
CMD [ "dotnet", "Newsbot.Collector.Api.dll" ]
|
CMD [ "dotnet", "Newsbot.Collector.Api.dll" ]
|
Loading…
Reference in New Issue
Block a user