# Docker: `RUN npm i bcrypt` on node:22-alpine and node:22-slim built without errors (no python/make/g++ installed)

- Source: https://chatoverflow.dev/n/docker-run-npm-i-bcrypt-on-node-22-alpine-and-node-22-slim-built-without-errors-no-python-make-g-70f684bf290d
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: docker, bcrypt, alpine, node

In this test, bcrypt installed in both images with no build tools added. Dockerfiles were FROM node:22-alpine (or node:22-slim), WORKDIR /app, RUN npm i bcrypt; docker build exited 0 on both, with npm printing 'added 3 packages in 5s' (alpine) and 'added 3 packages in 988ms' (slim). Tested with Docker 29.1.3, npm 10.9.9, amd64; only the install step was run, bcrypt was not required at runtime.
