surajcm / darkhold

darkhold is a self-hosted alternative emulating the famous classroom quiz portal Kahoot.
GNU General Public License v3.0
27 stars 8 forks source link

Does it run on RasPi? #56

Open dbddhkpde opened 1 year ago

dbddhkpde commented 1 year ago

Hi! I tried your kahoot-clone inside a Windows Hyper-V virtual machine and is runs fine so far. Now I try to figure out, if it runs on a Raspberry Pi 4 and run into problems.

docker ps says: STATUS Restarting (1) 4 seconds ago..... and I can't access the service wit http://my-local-ip-addr:8181 as I was able to when it runs inside the Hyper-V machine.

Am I right? Is there a way of getting it to run on a Pi? Thx in advance

Greeting -Stefan

surajcm commented 1 year ago

Hi,

Thank you for reaching out to me. I am happy to know that it worked on a Windows Hyper-V VM. I didn't try the app on a VM before.

I didn't know why it got failed. Any other logs will be really useful. Currently, I don't have access to a Raspberry Pi, but I will try to get hold of it and reproduce this issue.

Thank you

maxfire2008 commented 1 year ago

I ran this on my pi 3 I think it's because it's an ARM processor

root@rpicam:/home/max# docker run \
  --name Darkhold \
  --restart unless-stopped \
  -v "./Darkhold/db:/tmp/db" \
  -p 8181:8181/tcp \
  surajcm/darkhold
Unable to find image 'surajcm/darkhold:latest' locally
latest: Pulling from surajcm/darkhold
1da50e1664e1: Pull complete
e4c8e5a84542: Pull complete
a5611f32ee23: Pull complete
ea210f17a37d: Pull complete
f74763585838: Pull complete
Digest: sha256:2f28b28de140b4de322c8d62ba1321d13c5511f1e7c5a15a65033a7339e5f946
Status: Downloaded newer image for surajcm/darkhold:latest
docker: Error response from daemon: create ./Darkhold/db: "./Darkhold/db" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
See 'docker run --help'.

EDIT: oops - the volume was wrong

maxfire2008 commented 1 year ago

I tried building it and got this:

max@rpicam:~/darkhold $ sudo docker build .
Sending build context to Docker daemon  17.87MB
Step 1/6 : FROM openjdk:18-jdk
18-jdk: Pulling from library/openjdk
no matching manifest for linux/arm/v7 in the manifest list entries

Maybe you can't run openjdk in docker on arm?

EDIT: I can also access a Raspberry Pi 4 when I get back to school on the 8th so probably will be able to test within a few days (if I remember - feel free to ping to remind me)

surajcm commented 1 year ago

I guess openjdk is deprecated and may not be available for all arch, can you try the following instead? instead of FROM openjdk:18-jdk can you use FROM eclipse-temurin:18-jdk? I am planning to upgrade this app to java 19 soon and plan to use temurin 19 image there.

maxfire2008 commented 1 year ago

That worked on my Pi 3.

surajcm commented 1 year ago

Awesome 👍 . I just upgraded the project to java 19 with eclipse-temurin as the image.