MarcusWichelmann / EnergyExporter

Collects data from Modbus devices like SolarEdge inverters and exports it as JSON, XML or to Prometheus/InfluxDB.
MIT License
22 stars 2 forks source link

Bring back linux-arm (armv7) docker images #8

Closed yGuy closed 5 months ago

yGuy commented 1 year ago

Support for Docker Images on armV7 has been removed in this commit. The comment says that there's likely no one using it, but actually at least I was :-(

ArmV7 is what's running RaspberryPI and this is actually great for home automation which I would like to use this project for.

I am pasting this here for others to find. If you know of a better way, I would be happy to hear about it!

So the only quick workaround I found was to build the docker image manually on the PI (which takes many minutes on the PI4). To get this to work, I had to adjust the dockerfile to use the generic base image and then pass in the build arguments for TARGETARCH and TARGETOS to arm and linux.

MarcusWichelmann commented 1 year ago

Hi, I'm running this exporter on a Rasbberry 3B+ myself using the provided arm64 docker images.

All recent Raspberry Pis have arm64 CPUs: https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/ That's why I assumed, that armv7 is no longer needed and didn't spend the effort to fix the builds for it.

But you need to also run a 64-bit capable OS on the raspberry, to make arm64 binaries and Docker images work. So maybe that is your issue?

If you still need it, because a 64bit OS is not an option, please let me know and I will check again, if I can make armv7 on the CI work.

yGuy commented 1 year ago

Hmm. Good point! Then I obviously installed a 32-bit Ubuntu server on my PI ?! Wasn't even aware of this but it's been a few years... I will check the error messages again, but docker complained that it was not able to find the right image for my system and when I ran the docker build on the original Dockerfile I got all kind of invalid binary errors until I switched to the generic base image. I guess I should really be using a 64 bit OS to be more future-proof.

That said, it did build in the end so it's definitely possible, but not at all urgent from my side, anymore. Thanks!