diff --git a/back/Dockerfile b/back/Dockerfile index aee9f87e..29cccc4d 100644 --- a/back/Dockerfile +++ b/back/Dockerfile @@ -19,7 +19,7 @@ COPY . . ARG VERSION RUN dotnet publish -a $TARGETARCH --no-restore -c Release -o /app "-p:Version=${VERSION:-"0.0.0-dev"}" src/Kyoo.Host -FROM mcr.microsoft.com/dotnet/aspnet:7.0 +FROM mcr.microsoft.com/dotnet/aspnet:8.0 RUN apt-get update && apt-get install -y curl COPY --from=builder /app /app diff --git a/back/Dockerfile.migrations b/back/Dockerfile.migrations index 63dfe3ca..fad77418 100644 --- a/back/Dockerfile.migrations +++ b/back/Dockerfile.migrations @@ -7,6 +7,7 @@ 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"] +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};"