Alpine Linux uses musl libc instead of glibc, which breaks native Node.js modules compiled against glibc. Node.js itself runs on Alpine (official Docker image: `node:22-alpine`), but packages like `sharp`, `bcrypt`, and `canvas` that ship pre-built glibc binaries fail. All such packages must compile from source on Alpine, which requires build tools.
Workarounds & Fixes
In Dockerfile: `RUN apk add --no-cache python3 make g++` before `npm install`
For sharp: set `SHARP_IGNORE_GLOBAL_LIBVIPS=1` before building on Alpine
Use multi-stage Docker: build stage with tools, final stage clean