mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
* update rtn to 025 * Implement movie / show type parsing * switch to RTN in collectors * ensure env for pythonnet is loaded, and that requirements copy for qbit * version bump
32 lines
872 B
Docker
32 lines
872 B
Docker
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
|
|
ARG TARGETARCH
|
|
WORKDIR /src
|
|
COPY shared/ shared/
|
|
COPY qbit-collector/ qbit-collector/
|
|
WORKDIR /src/qbit-collector/
|
|
RUN dotnet restore -a $TARGETARCH
|
|
RUN dotnet publish -c Release --no-restore -o /src/out -a $TARGETARCH
|
|
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine3.19
|
|
|
|
WORKDIR /app
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
RUN apk add --update --no-cache python3=~3.11.8-r0 py3-pip && ln -sf python3 /usr/bin/python
|
|
|
|
COPY --from=build /src/out .
|
|
|
|
RUN rm -rf /app/python && mkdir -p /app/python
|
|
|
|
RUN pip3 install -r /app/requirements.txt -t /app/python
|
|
|
|
RUN addgroup -S qbit && adduser -S -G qbit qbit
|
|
USER qbit
|
|
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
|
|
CMD pgrep -f dotnet || exit 1
|
|
ENV PYTHONNET_PYDLL=/usr/lib/libpython3.11.so.1.0
|
|
ENTRYPOINT ["dotnet", "QBitCollector.dll"]
|