jordemort / docker-pleroma

Pleroma in a container
https://hub.docker.com/r/jordemort/pleroma
16 stars 1 forks source link

Exec format error with arm container #25

Closed scottsweb closed 2 years ago

scottsweb commented 2 years ago

Hello, I am attempting to run this container on a Raspberry Pi and get the following errors during startup:

/opt/pleroma/releases/2.4.2/../../erts-10.7.2.16/bin/erl: 12: exec: /opt/pleroma/erts-10.7.2.16/bin/erlexec: Exec format error

I am not 100% sure of the cause, but have a feeling that all images may be using the amd64 arch.

I also had a go at building the container myself, I get a little further but my build seems to struggle to generate the Pleroma config:

pleroma     | !!! Config path is not declared! Please ensure it exists and that PLEROMA_CONFIG_PATH is unset or points to an existing file
pleroma     | The task would have overwritten the following files:
pleroma     | - /tmp/setup_db.sql

Still trying to work out what is happening as the PLEROMA_CONFIG_PATH env variable is set.

jordemort commented 2 years ago

I think I fixed the arch issue in https://github.com/jordemort/docker-pleroma/pull/26 - new builds should be available on Docker Hub shortly. Not sure about the configuration thing. FWIW I built this container but then never actually ended up deploying it, it could probably use a new maintainer :D

scottsweb commented 2 years ago

Thanks for the speedy reply and fixes! new container is now at the same point as the one I built with the error:

pleroma     | !!! Config path is not declared! Please ensure it exists and that PLEROMA_CONFIG_PATH is unset or points to an existing file
pleroma     | The task would have overwritten the following files:
pleroma     | - /tmp/setup_db.sql

I will continue to investigate and may fork the project if I can get it work.

Thanks again!

jordemort commented 2 years ago

Maybe tossing a set -x on the top of generate_pleroma_config.sh and run_pleroma.sh would produce some useful info?

jordemort commented 2 years ago

Hey I tried running it locally and I get that same message, but it doesn't seem to be fatal; it goes on to generate the configuration and comes up:

pleroma_1   | !!! Config path is not declared! Please ensure it exists and that PLEROMA_CONFIG_PATH is unset or points to an existing file
pleroma_1   | Writing config to /etc/pleroma/config.exs.
pleroma_1   | Writing the postgres script to /tmp/setup_db.sql.
pleroma_1   | Writing /var/lib/pleroma/static/robots.txt.

I think it's normal/to be expected on first run because while the variable is defined, the config doesn't exist yet because it hasn't been generated.

scottsweb commented 2 years ago

Unfortunately for me, it just keeps looping that it is unable to write those files (although the first time it says they are written as expected)... I mount /etc/pleroma/ to my host machine in my docker-compose:

    volumes:
      - ./pleroma/config:/etc/pleroma
      - ./pleroma/uploads:/var/lib/pleroma/uploads
      - ./pleroma/static:/var/lib/pleroma/static

I have a feeling it might be a permissions issue. Adding a touch /etc/pleroma/config.exs to generate-pleroma-config.sh (before the config generation starts) gives me a permissions error and I never see the config.exs file appear on my host. My next attempt will be to remove USER pleroma from the Dockerfile and see if that fixes it.

scottsweb commented 2 years ago

That fixed it for me, so I think the pleroma USER isn't able to write to that directory. I think we can go ahead and close this now! Thanks for all your help.