librespeed / speedtest-rust

Rust backend for LibreSpeed
GNU Lesser General Public License v3.0
38 stars 7 forks source link

Add action Container build and push #9

Closed mickkael closed 1 month ago

mickkael commented 1 month ago

it build the container for amd64, armv7 and arm64 and push to ghcr.io registry

SudoDios commented 1 month ago

Hi @mickkael, thank you. I just a test this but get this error : exec /usr/local/bin/librespeed-rs: no such file or directory. Is the problem with my docker configuration or something else ☺️ ?

mickkael commented 1 month ago

Let me check and come back to you. I have tested the container build, but not the container actually

mickkael commented 1 month ago

@SudoDios I have found the issue. Actually the binary is not working with alpine for an unknown reason. I will submit a fix later

SudoDios commented 1 month ago

@mickkael Oh Ok. Let me know if I can help

SudoDios commented 1 month ago

@mickkael I think I found the real problem. The problem is with glibc, it doesn't exist in alpine, and alpine works with musl. I just put musl in docker and it worked. Read this

mickkael commented 1 month ago

I made it work with debian base image, but I'll replace with the musl build instead. I'll push a commit soon

mickkael commented 1 month ago

I have a working version for alpine/amd64. But it fails to run for arm/aarch. I can't find the good compilation config to make it compatible musl. I'll push with debian for now, alpine requires more work

SudoDios commented 1 month ago

Does Debian not have a light version in Docker ? Why must you work with Alpine ?

mickkael commented 1 month ago

Alpine is much much slimmer with fewer packages. Hence it is less prone to vulnerabilities, and is indeed faster to download. But debian will be ok

SudoDios commented 1 month ago

Now working on Debian. But the only problem is its size ? is it true ? I think we should merge this for now and then it can be improved. Okay ?

mickkael commented 1 month ago

I build and test on amd64 and arm64. I will share the container size

mickkael commented 1 month ago

It's confirmed working on docker on x86_64 and arm64/rpi4. The container size is 102mb on x86_64 and 118 mb on arm64. It's good for a merge on my side

SudoDios commented 1 month ago

Ok, We will do it tomorrow. Thank you 😊