rosskouk / asknavidrome

An Alexa skill to allow streaming of music from Subsonic API compatible media servers on Amazon Echo devices.
https://rosskouk.github.io/asknavidrome
MIT License
48 stars 7 forks source link

Log error Container #14

Closed otebono closed 9 months ago

otebono commented 1 year ago

When I try to start Docker container I get this error:

exec /opt/env/bin/python3: exec format error

I'm using Debian 11 OS in a Raspberry pi 4.

rosskouk commented 1 year ago

Hi,

Can you give me the full docker run command or a copy of your compose file as I'm not able to recreate the issue.

Thanks.

otebono commented 1 year ago

Sure, here it is.

docker-compose.txt

rosskouk commented 1 year ago

Hi @otebono

I think this is happening because you are running the container on a Raspberry PI. The container image I have provided was built on an amd64 platform. I will look into this in the future, however the quickest way for you to get up and running would be to use your Raspberry PI to build a fresh image using the Dockerfile in the repository. I hope that helps, please let me know how you get on.

celynw commented 1 year ago

For what it's worth, I managed to use @rosskouk's suggestion to make it work. Glad I found this issue, great project, thanks!

I did have a problem pulling the alpine image:

ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)

but I managed to fix that with this issue comment:

sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
ScruffyDerHausmeister commented 4 months ago

@celynw Can you describe how to create an image / container for raspberrypi (4)?

celynw commented 4 months ago

Sure - it's been a while and I wanted to set this up again anyway. I'm not sure how familiar you are with this process but I think this might be detailed enough:

  1. Create a directory somewhere on your raspberry pi, e.g.

    mkdir ~/asknavidrome
  2. Get the Dockerfile from this repository.

  3. Put the Dockerfile directly in that directory, so in my case it was ~/asknavidrome/Dockerfile.

  4. From the terminal, change directory to that directory:

    cd ~/asknavidrome
  5. Then run

    docker build .

    (You will need to have docker installed) This might take a while. If it worked, the final line should say:

    Successfully built c3fa3e3682db

    or something like that. If you have an issue like I mentioned in my previous message, try following that. But I didn't have that error this time.

  6. You can double check the image exists by running docker image ls, and near the top it should have something like:

    REPOSITORY                                             TAG                         IMAGE ID       CREATED         SIZE
    <none>                                                 <none>                      c3fa3e3682db   3 minutes ago   122MB
  7. You could now do docker run c3fa3e3682db and it would work, but it might be better to tag it:

    docker image tag c3fa3e3682db asknavidrome:v0.8

    which makes it much easier to find later

    REPOSITORY                                             TAG                         IMAGE ID       CREATED          SIZE
    asknavidrome                                           v0.8                        c3fa3e3682db   11 minutes ago   122MB
  8. Now you can edit your docker-compose.yml to point to the image you built:

    image: 'asknavidrome:v0.8'

    I do this part with Portainer, so after pressing Update the stack it's up and running