debridmediamanager / zurg-testing

A self-hosted Real-Debrid webdav server you can use with Infuse. Together with rclone it can mount your Real-Debrid torrent library into your filesystem and load it to Plex or Jellyfin.
432 stars 30 forks source link

Exec format error on arm64 + docker #18

Closed ebai101 closed 8 months ago

ebai101 commented 9 months ago

I'm trying to use the docker image on my Arm box, but I can't seem to get a working image from the repo. When I try to run a container with the image it shows me this:

$ docker run ghcr.io/debridmediamanager/zurg-testing:latest
exec ./zurg: exec format error
$ uname -m
aarch64

The linux-arm64 executable from the releases folder works fine for me, but I'd like to run it in a container for networking purposes.

kszkristof commented 8 months ago

There are images for ARM architectures, but the latest tag is the amd64 image.

See here the tags for ARM images: https://github.com/orgs/debridmediamanager/packages/container/package/zurg-testing (as of now it's ghcr.io/debridmediamanager/zurg-testing:v0.9.2-hotfix.4@sha256:1ecb2ba18d487234344cf1a227f657327a85c12ad7a7aa49aa9cfa5d6eb0c98e for arm64).

The downside of this is that you're pinning this specific version so if you use watchtower or just try to pull the image again it won't download the newest version, instead, you'll have to get the new arm64 tag and pull / use that image.

EDIT: nevermind. I just tried both the armv7 and armv8 tags and they give the same error.

lostb1t commented 8 months ago

only the docker image is arm64, the zurg executable doesn’t seem to be compiled for arm64 hence the error.

running on arm as well and experiencing the same issue

ebai101 commented 8 months ago

FWIW, I managed to get a rudimentary container working with this Dockerfile. I'm not sure if it's 100% functional, but it seems to run OK.

FROM alpine:latest
CMD mkdir /app
WORKDIR /app

# using the latest linux-arm64 release from github
COPY ./zurg .

# gcompat is definitely needed, curl and python3 i believe are used for the healthcheck script
RUN apk add --no-cache curl python3 gcompat

ENTRYPOINT ./zurg

Build and run:

docker build -t zurg-aarch64 .
docker run -v ./config.yml:/app/config.yml zurg-aarch64
yowmamasita commented 8 months ago

I have found out the issue on the arm build for zurg's image. I will fix it asap

herobrauni commented 8 months ago

In case others with this Problem are following this issue. It seems to be fixed with the latest commit and you can use "zurg:latest" again on arm. Thanks a lot for the quick fix !

yowmamasita commented 8 months ago

Yes it is now fixed on the :latest tag!