I am working on a Ruby project and using the polars-df gem. My application is dockerized and I am using an Alpine-based Docker image. However, I am encountering an error related to the polars-df gem when I try to run my application. The error message is:
LoadError: Error relocating /usr/local/bundle/gems/polars-df-0.9.0-aarch64-linux/lib/polars/3.1/polars.so:
__register_atfork: symbol not found -
It seems like the gem is trying to use the __register_atfork symbol, which is not found. This symbol is a part of the glibc library, and it’s not available in the musl library that Alpine Linux uses by default. I have tried to add glibc to my Alpine-based Docker image, but it seems like it’s not working as expected. Here is the relevant part of my Dockerfile:
RUN apk --no-cache add ca-certificates wget &&
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub &&
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-2.35-r1.apk &&
apk add glibc-2.35-r1.apk
I would like to continue using Alpine for my Docker image. Does anyone have any suggestions on how I can resolve this issue?