rogerfar / rdt-client

Real-Debrid Client Proxy
MIT License
907 stars 113 forks source link

dotnet issue starting in latest version #352

Closed Muneer91 closed 10 months ago

Muneer91 commented 1 year ago

What version are you using? 2.0.46 Wat OS are you running? raspberry pi Are you using Docker or as a service? docker Which debrid provider are you using? real-debrid Please attach a log file here with the log setting set to debug Setting permissions chown: WARNING: Circular directory structure. This almost certainly means that you have a corrupted file system. NOTIFY YOUR SYSTEM MANAGER. The following directory is part of the cycle: /data/db Changing to /app folder Starting rtdclient s6-applyuidgid: fatal: unable to exec dotnet: Exec format error

Muneer91 commented 1 year ago

Reverting back to 2.0.40 works fine

akhil-rana commented 1 year ago

Facing the same issue after 2.0.40+ versions

Probably related to arm64 architecture and dotnet compatibility.

tanmaster commented 12 months ago

same here, getting s6-applyuidgid: fatal: unable to exec dotnet: Exec format error with the latest iamge

boliito commented 12 months ago

Same here...

Neckk commented 12 months ago

Facing the same issue after 2.0.40+ versions

Probably related to arm64 architecture and dotnet compatibility.

I'm not sure it's arm, I'm running it on intel j5005 and needed to downgrade to v2.0.40 v2.0.46 would eat up all ram, I was getting oom exception at the end and would need to restart the computer.

jonnery1 commented 12 months ago

Facing the same issue after 2.0.40+ versions Probably related to arm64 architecture and dotnet compatibility.

I'm not sure it's arm, I'm running it on intel j5005 and needed to downgrade to v2.0.40 v2.0.46 would eat up all ram, I was getting oom exception at the end and would need to restart the computer.

Same issue here. As soon as I try to download something bigger the ram filles up until the server becomes unresponsive and I have to restart. I am running an Intel i7-6700K....

rogerfar commented 12 months ago

I'll update the docker to use the package manager again instead of manually installing .NET. Issue was that the package managers didn't have 8 yet.

I also noticed the ram issue, couldn't reproduce it but can see it happening on docker x64 too.

TOomaAh commented 12 months ago

Hello,

I didn't have the specified problem until I updated to the latest version v2.0.47.

Muneer91 commented 12 months ago

I'll update the docker to use the package manager again instead of manually installing .NET. Issue was that the package managers didn't have 8 yet.

I also noticed the ram issue, couldn't reproduce it but can see it happening on docker x64 too.

Hi,

still facing this issue with 2.0.47

unalkalkan commented 11 months ago

+1 on this

laster13 commented 11 months ago

this dockerfile works for me, I modified the dotnet installation which was not working. RUN \
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && chmod +x ./dotnet-install.sh && ./dotnet-install.sh --runtime aspnetcore --channel 8.0 && mv /root/.dotnet /usr/share/dotnet


FROM node:18-alpine3.18 AS node-build-env
ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/arm64}
ARG BUILDPLATFORM
ENV BUILDPLATFORM=${BUILDPLATFORM:-linux/arm64}

RUN mkdir /appclient
WORKDIR /appclient

RUN apk add --no-cache git python3 py3-pip make g++

RUN \
   echo "**** Cloning Source Code ****" && \
   git clone https://github.com/rogerfar/rdt-client.git . && \
   cd client && \
   echo "**** Building Code  ****" && \
   npm ci && \
   npx ng build --output-path=out

RUN ls -FCla /appclient/root

# Stage 2 - Build the backend
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim-arm64v8 AS dotnet-build-env
ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/arm/v8}
ARG BUILDPLATFORM
ENV BUILDPLATFORM=${BUILDPLATFORM:-linux/arm/v8}

RUN mkdir /appserver
WORKDIR /appserver

RUN \
   echo "**** Cloning Source Code ****" && \
   git clone https://github.com/rogerfar/rdt-client.git . && \
   echo "**** Building Source Code for $TARGETPLATFORM on $BUILDPLATFORM ****" && \
   cd server && \
   if [ "$TARGETPLATFORM" = "linux/arm/v7" ] ; then \
      echo "**** Building $TARGETPLATFORM arm v7 version" && \
      dotnet restore --no-cache -r linux-arm RdtClient.sln && dotnet publish --no-restore -r linux-arm -c Release -o out ; \
   elif [ "$TARGETPLATFORM" = "linux/arm/v8" ] ; then \
      echo "**** Building $TARGETPLATFORM arm v8 version" && \
      dotnet restore --no-cache -r linux-arm64 RdtClient.sln && dotnet publish --no-restore -r linux-arm64 -c Release -o out ; \
   else \
      echo "**** Building $TARGETPLATFORM x64 version" && \
      dotnet restore --no-cache RdtClient.sln && dotnet publish --no-restore -c Release -o out ; \
   fi

# Stage 3 - Build runtime image
FROM ghcr.io/linuxserver/baseimage-alpine:3.18
ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/arm/v8}
ARG BUILDPLATFORM
ENV BUILDPLATFORM=${BUILDPLATFORM:-linux/arm/v8}

# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io extended version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="ravensorb"

# set environment variables
ARG DEBIAN_FRONTEND="noninteractive"
ENV XDG_CONFIG_HOME="/config/xdg"
ENV RDTCLIENT_BRANCH="main"

RUN \
    mkdir -p /data/downloads /data/db || true && \
    echo "**** Updating package information ****" && \
    apk update && \
    echo "**** Install pre-reqs ****" && \
    apk add bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib && \
    echo "**** Installing dotnet ****" && \
    echo "**** Setting permissions ****" && \
    chown -R abc:abc /data && \
    rm -rf \
        /tmp/* \
        /var/cache/apk/* \
        /var/tmp/* || true

RUN \    
    wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && chmod +x ./dotnet-install.sh && ./dotnet-install.sh --runtime aspnetcore --channel 8.0 && mv /root/.dotnet /usr/share/dotnet

ENV PATH "$PATH:/usr/share/dotnet"

# Copy files for app
WORKDIR /app
COPY --from=dotnet-build-env /appserver/server/out .
COPY --from=node-build-env /appclient/client/out ./wwwroot
COPY --from=node-build-env /appclient/root/ /

# ports and volumes
EXPOSE 6500
VOLUME [ "/data" ]

# Check Status
HEALTHCHECK --interval=30s --timeout=30s --start-period=30s --retries=3 CMD curl --fail http://localhost:6500 || exit ```
rogerfar commented 10 months ago

This should be fixed now in the latest docker images.