how to get better-sqlite3 to work in docker

hello. I'm getting this error when trying to run a t3 app with better-sqlite3, which I'm using with lucia auth to run and I tried using a newer node alpine image (18 and 21). The error is very similar to the one reported here https://github.com/TryGhost/node-sqlite3/issues/1581
Error: Error relocating /app/node_modules/better-sqlite3/build/Release/better_sqlite3.node: fcntl64: symbol not found

any help would be appreciated.
GitHub
I have a node app running in a node:16-alpine docker image, and the application starts fine, but when it tries to load sqlite and use it, I get the following stack trace: node:internal/modules/cjs/...
Solution
or move to a debian based image for example
Was this page helpful?