mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
14 lines
536 B
Docker
14 lines
536 B
Docker
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 mcr.microsoft.com/dotnet/runtime-deps:8.0
|
|
COPY --from=builder /app/migrate /app/migrate
|
|
|
|
ENTRYPOINT /app/migrate --connection "USER ID=${POSTGRES_USER};PASSWORD=${POSTGRES_PASSWORD};SERVER=postgres;PORT=5432;DATABASE=${POSTGRES_DB};"
|