apotdevin / thunderhub

ThunderHub LND Lightning Node Manager in your Browser
https://www.thunderhub.io/
MIT License
417 stars 89 forks source link

v0.13.7 docker image is missing arm architectures #414

Open aphex3k opened 2 years ago

aphex3k commented 2 years ago

Describe the problem/bug The v0.13.7 image is missing arm architectures while the v0.13.6 image had them still. The base image is present for v0.13.7 however

Expected behavior Just like for v0.13.6 the architectures in the v0.13.7 image hosted on dockerhub should include arm v7 and arm64 v8.

Screenshots/Links

image image

Additional context

clonmac commented 2 years ago

I just tried building the docker image myself and it failed trying to install libvips as there is no prebuilt linuxmusl-armv7 version of libvips available. So that might be why there isn't an armv7 image for Docker available.

Step 5/30 : RUN npm ci
 ---> Running in eb3abd3ca013

> sharp@0.30.1 install /app/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)

sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.12.2/libvips-8.12.2-linuxmusl-armv7.tar.br
sharp: Installation error: Prebuilt libvips 8.12.2 binaries are not yet available for linuxmusl-armv7

I was looking and it doesn't look like there has ever been a prebuilt libvips linuxmusl-armv7 version available, so I am not sure if this is a new dependency for ThunderHub or what. So at the moment, ThunderHub won't build for Docker for armv7 using a linuxmusl Alpine base image. I could probably switch the Dockerfile to a different base image, but that would require significant changes to the Dockerfile. I'd also prefer to stick with Alpine for my containers.

aphex3k commented 2 years ago

@clonmac There is an arm64 image existing: https://hub.docker.com/layers/apotdevin/thunderhub/v0.13.7-arm64v8/images/sha256-539c66599ef68c8523daa424220888451687874b42fe3aff495d8129742dd7a5?context=explore

clonmac commented 2 years ago

Ya, I am trying to build for armv7. There previously were images available for armv7 with 0.13.6. I normally build my images myself and when building the image for armv7 it fails because there is no pre-built libvips module for armv7 for linuxmusl which is what the base Alpine image uses. Looks like I'd need to either use a different base image that doesn't use musl-libc which would require altering the Dockerfile significantly or build libvips from source during the build process to proceed with building Thunderhub under Alpine linux on armv7. Haven't had the time though to dig into which option would be easiest though.

clonmac commented 2 years ago

I just noticed there is an arm32v7.Dockerfile in the project. I didn't notice that before. I just tried building an image with that Dockerfile, but it failed too. Seems like an npm error. Unfortunately I haven't had much time to dig into why.

Not sure why there suddenly isn't a pre-built arm32v7 ThunderHub image up on DockerHub though. Not sure if there were issues building it for the DockerHub registry too or if it is just me.

clonmac commented 2 years ago

I removed the sharp module from the packages dependency list since there is no pre-built libsvips module for arm32v7-linuxmusl (Alpine) which the sharp module depends on. I was able to successfully build the docker image for arm32v7 without that module since it appears to be optional for image optimization. It looks like it was just added as a dependency recently ( #407 ). I haven't noticed any issues without the sharp module included, but that module appears to be why the docker image does not build successfully for arm32v7 using a linuxmusl Alpine base image.