timoschlueter / nightscout-librelink-up

Script written in TypeScript that uploads CGM readings from LibreLink Up to Nightscout.
MIT License
200 stars 252 forks source link

Docker container for Raspberry Pi #45

Closed cubybox closed 2 years ago

cubybox commented 2 years ago

Hi Timo,

do you think it is possible to create the Docker container for arm64 in addition to the amd64 platform? Then you could run the whole thing very energy-efficiently on a Raspberry Pi.

Many greets Dirk

khskekec commented 2 years ago

Hi Dirk,

I am really interested to this topic also and am confused now. I thought that this should be also possible with the current image.

Do you fear incompatibility or would wish a more performant image?

Kind regards

Selçuk

cubybox commented 2 years ago

Hi Selçuk,

unfortunately it is not compatible. Until then I also thought that a Docker container runs on any platform. Unfortunately that is not the case. In this case you get the following error message:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested.

greeting dirk

khskekec commented 2 years ago

Hi Dirk,

I read something about problems on arm based archs and docker. There might be a problem to recognize the needed platform image correctly.

Can you try to define the arch explicitly like:

FROM --platform=linux/arm64/v8 node

Unfortunately I do not have a rpi actually which is up and running.

Would be great if you can give me some feedback 😊.

Kind regards

Selçuk

cubybox commented 2 years ago

Hi Selçuk,

I've already tried that. Unfortunately does not work. Then the only way left is to define the Docker container for multiplatform. Then it should work.

For now, I've done a setup at heroku.com. Works well and I don't have to leave the Windows PC running 24 hours a day. But I'm still interested in getting the whole thing to run on a Pi ;-)

greets Dirk

marcograwunder commented 2 years ago

You could just run docker create (https://docs.docker.com/engine/reference/commandline/create/) with the given dockerfile directly on the raspberry pi. Then a Arm-based image is created and can be used there.

timoschlueter commented 2 years ago

I just release version 1.7.1 with support for ARM64 platforms. :) Feel free to try it on your RPi @cubybox.

timoschlueter commented 2 years ago

I added version 1.7.2 with support for ARMv7 (Raspberry Pi 3). Was able to run it on my device. I don't have a RPi 4 available for testing but on the RPi 3 the container runs just fine. :)

cubybox commented 2 years ago

Hi Timo,

it runs great on an old raspberry PI3 that I still had here. Many thanks for the quick help!

Many greetings Dirk