The problem had to do with missing OpenGL modules in the Debian environment.
Adding this:
libgl1 \
libglib2.0-0 \
in the Dockerfile solved the problem
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
libcairo2 \
libpango1.0-0 \
libgdk-pixbuf2.0-0 \
shared-mime-info \
libgirepository1.0-dev \
gir1.2-pango-1.0 \
gir1.2-gdkpixbuf-2.0 \
gir1.2-cairo-1.0 \
python3-gi \
python3-cairo \
git \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*