ExpressDocker

Alpine Linux Docker base image breaks native Node.js dependencies

warning
configurationUpdated Sep 1, 2025(via Exa)
How to detect:

Alpine Linux-based Docker images lack required build dependencies for native Node.js modules. Packages like bcrypt fail to compile, and Node.js 22 requires specific Alpine/Debian versions to avoid "GLIBC not found" runtime errors.

Recommended action:

Use node:18-alpine or node:22-alpine images with apk add build-base python3 for native dependencies. Verify all native modules (bcrypt, node-gyp packages) compile successfully in Alpine. Alternatively, use Debian-based images (node:18, node:22) for better compatibility. Install security updates with apk update && apk upgrade.