SoFunction
Updated on 2025-04-09

Solve the problem of error reporting on running Docker image: version `GLIBC_2.32' not found

Solve the error running Docker image: version`GLIBC_2.32’not found

Detailed error log

xapi-backend % docker logs 036de55b5bc6
./xapi-backend: /lib/aarch64-linux-gnu/.6: version `GLIBC_2.32' not found (required by ./xapi-backend)
./xapi-backend: /lib/aarch64-linux-gnu/.6: version `GLIBC_2.34' not found (required by ./xapi-backend)

Cause analysis

This error indicates that your binary needs a newer version at runtime than the glibc version provided in the debian:buster-slim image.

debian:buster-slim uses older glibc versions and does not support the GLIBC_2.32 and GLIBC_2.34 versions required by your application.

solve

Use a lighter base mirror of Alpine Linux and install the required runtime libraries on it.

# Use Alpine Linux as the final base imageFROM alpine:latest

# Install GLIBC and other runtime librariesRUN apk --no-cache add ca-certificates libc6-compat

Additional Notes:

I have tried all the following, but it doesn't work. Avoid the pit:

# debian:buster-slim is a minimized Linux distribution for containerized applicationsFROM debian:buster-slim

# debian:bullseye-slim contains newer glibc versionsFROM debian:bullseye-slim

# debian:testing-slim contains newer glibc versionsFROM debian:testing-slim

FROM frolvlad/alpine-glibc

FROM ubuntu

Summarize

The above is personal experience. I hope you can give you a reference and I hope you can support me more.