fscorrupt / Posterizarr

🖼️ Automated poster maker for Plex/Jellyfin/Emby.
107 stars 10 forks source link

Unable to run on Raspberry Pi with exec format error #131

Closed mark-buhagiar closed 2 months ago

mark-buhagiar commented 2 months ago

Describe the bug Running using docker compose as per below.

version: "3"

name: posterizarr

services:
  posterizarr:
    container_name: posterizarr
    environment:
      - PUID=${PUID}
      - PGID=${GUID}
      - UMASK=022
      - TZ=Europe/London
      - TERM=xterm
      - RUN_TIME=10:30,04:30
    image: ghcr.io/fscorrupt/docker-posterizarr:latest
    restart: unless-stopped
    volumes:
      - posterizarr-config:/config
      - posterizarr-data:/assets

volumes:
  posterizarr-config:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "$PWD/posterizarr/config"

  posterizarr-data:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "$PWD/posterizarr/data"

Running on a raspberry pi 4 using: docker compose -f poster.yaml up Fails repeatedly with: exec /sbin/tini: exec format error

p.s. Also fails when running it on my dev machine macbook with posterizarr exited with code 139

fscorrupt commented 2 months ago

PUID=${PUID} & PGID=${GUID} are variables, you have to specify values for it. ${} will only work if you have a .env file for your compose, for example without this file it is in my case:

      - PUID=1000
      - PGID=1000
mark-buhagiar commented 2 months ago

yes - sorry, should've menitoned, i've them specified in a .env file, because they're different on the various environments. I don't suspect it to be a permission issue because the rest of the arr stack runs fine.

fscorrupt commented 2 months ago

Ah okey, have you tried to directly specify the platform in compose file? Maybe it does not get detected, container is build with following:

linux/amd64,linux/armhf,linux/arm64

Sadly i do not have an mac or raspberry where i can test it.

mark-buhagiar commented 2 months ago

Admittedly i'm no docker expert, but according to my friend stackoverflow, the platform option is not supported in v3. To be honest, the repo is really quite simple, it's just the one file, so i tried buidling my own image, which also didn't work. Odd.

Fatal error. System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault

edit: my work machine is a windows. I'll give it a go there in the morning 😂

fscorrupt commented 2 months ago

Admittedly i'm no docker expert, but according to my friend stackoverflow, the platform option is not supported in v3. To be honest, the repo is really quite simple, it's just the one file, so i tried buidling my own image, which also didn't work. Odd.

Fatal error. System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault

edit: my work machine is a windows. I'll give it a go there in the morning 😂

on docker pull it should still be available.

i also rebuilded the image maybe there was an issue during last automatic build.

ive tested it on windows and ubu, on both it works without problems.

what ive found out is, that it may has to do with the mulitarch image, please try the explicit arch image:

linux/amd64
$ docker pull ghcr.io/fscorrupt/docker-posterizarr:latest@sha256:bcebd9aad7e1730c2776f601349096ef7648ac35c50522e7fac7233c6037768d

linux/arm/v7
$ docker pull ghcr.io/fscorrupt/docker-posterizarr:latest@sha256:a428f59594bcf81a9ebb77c094b7b36f4bd7dfc0625bf36866e9e2b49f632136

linux/arm64
$ docker pull ghcr.io/fscorrupt/docker-posterizarr:latest@sha256:a3e1e34816ad1357af3886e934b9e3e9f83e4ed1a397047bfa0d0feb4d58c2f5

unknown/unknown
$ docker pull ghcr.io/fscorrupt/docker-posterizarr:latest@sha256:794520ebc23424d28dda83ff1c689713aae810dc321b21fc40dfe5e5e7e4e7e9
fscorrupt commented 2 months ago

@mark-buhagiar any update on this?

mark-buhagiar commented 2 months ago

Still no luck. Any chance you could share the dockerfile and whatever Start.ps1 is with me?

I created the simplest of dockerfiles as per below, and it ran fine (and prompted me to create a config file)

FROM mcr.microsoft.com/powershell
WORKDIR /app
COPY . /app
ENTRYPOINT ["pwsh"]
CMD ["Posterizarr.ps1"]
fscorrupt commented 2 months ago

Still no luck. Any chance you could share the dockerfile and whatever Start.ps1 is with me?

I created the simplest of dockerfiles as per below, and it ran fine (and prompted me to create a config file)

FROM mcr.microsoft.com/powershell
WORKDIR /app
COPY . /app
ENTRYPOINT ["pwsh"]
CMD ["Posterizarr.ps1"]

hey, Please try the dev image i changed a few things for the multi arch part. ghcr.io/fscorrupt/docker-posterizarr-dev:latest

i want to keep the docker repo private, as i put a lot of effort into the image.

mark-buhagiar commented 2 months ago

Doesn't work still. For what it's worth, I did try it on my windows machine, and it worked as expected.

I completely understand that you don't want to share the dockerfile :)

Thanks for the effort in trying to get this resolved.

fscorrupt commented 2 months ago

Doesn't work still. For what it's worth, I did try it on my windows machine, and it worked as expected.

I completely understand that you don't want to share the dockerfile :)

Thanks for the effort in trying to get this resolved.

hey @mark-buhagiar

No problem. Please try the dev image again.

I changed the way Tini gets installed. I found out online that Tini is not multi-arch, so I had to specify the architecture during the Docker build, which I hadn't done before. Now it's integrated. Fingers crossed!

mark-buhagiar commented 2 months ago

Progress! The error has now changed!

posterizarr  | [FATAL tini (8)] exec pwsh failed: Exec format error
posterizarr exited with code 0

Edit: I also gave it a go on my apple silicone Mac, and am still on the same issue I mentioned above terminate called after throwing an instance of 'PAL_SEHException''. Not at all bothered about it not working there though.

fscorrupt commented 2 months ago

Okey, i think the arm part for powershell is not integrated in my base image, i will try to build a arm only image next week with an prebuild powershell Base.

fscorrupt commented 2 months ago

Okey, i think the arm part for powershell is not integrated in my base image, i will try to build a arm only image next week with an prebuild powershell Base.

Ive played a few ours today, sadly no luck, there are a lot of dependencies for imagemagick, tini and powershell, im not able to get a running container on arm.

But you should be able to manually install it on arm.

Required things are in readme.

Sorry, but not possible with my docker knowhow 😮‍💨

fscorrupt commented 2 months ago

@mark-buhagiar

ARM support (not for docker) added, in order to get Posterizarr running you have to follow the walkthrough: https://github.com/fscorrupt/Posterizarr/blob/main/walkthrough.md