Create a migration dockerfile

This commit is contained in:
Zoe Roux 2024-03-25 22:25:31 +01:00
parent 9740a5d0d4
commit d24d18ea8e
No known key found for this signature in database

View File

@ -0,0 +1,12 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 as builder
ARG TARGETARCH
WORKDIR /kyoo
COPY .config/dotnet-tools.json .config/dotnet-tools.json
RUN dotnet tool restore
COPY . .
RUN dotnet ef migrations bundle --self-contained -f -o /app/migrate -p src/Kyoo.Postgresql --verbose
FROM alpine
COPY --from=builder /app /app
ENTRYPOINT ["/app/migrate"]