GRA0007 / crab.fit

Enter your availability to find a time that works for everyone!
https://crab.fit
GNU General Public License v3.0
244 stars 31 forks source link

./api: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./api) #305

Open poka-IT opened 10 months ago

poka-IT commented 10 months ago

Description of the bug

After build the Dockerfile in /api, when I try to run the docker image, I got this error:

$ sudo docker run -p 127.0.0.1:3001:3000 crab-fit-api
./api: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./api)
./api: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./api)
./api: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./api)

To reproduce

sudo docker build -t crab-fit-api .
sudo docker run -p 127.0.0.1:3001:3000 crab-fit-api

Expected behavior

The Docker container should start.

Additional information

Use in Debian 11 inside LXC container.

mowtim commented 9 months ago

Same problem in Debian 12.2 and Ubuntu 22.04

wetzel-desy commented 3 months ago

I'm experiencing the same issue on Fedora39 with docker version 26.0.0, build 2ae903e.

wetzel-desy commented 3 months ago

The reason for this issue is the OS-version mismatch between the build and runtime layers in the Dockerfile. While the build-layer with rust:latest is based on debian:bookworm-slim and comes with GLIBC 2.36-9+deb12u4, the runtime layer is based on debian:bullseye-slim which is shipped with GLIBC 2.31-13+deb11u8.

A simple fix seems to be replacing the runtime image tag bullseye-slim with bookworm-slim. At least the image is now complaining about the missing GCP_CREDENTIALS instead of missing GLIBC versions...