How to solve "Could not find any Python installation to use" with docker node alpine Image when adding bcrypt to package.json?

Open Powershell with administrator privileges and run this command, then proceed with bcrypt installation

Windows: npm install --global --production windows-build-tools


Linux Alpine is very minimalist image. If performance is not a restriction, you may want to consider using the official node image that has all the dependencies you need and just worry about development: https://github.com/nodejs/docker-node So, you can have a Dockerfile like this:

FROM node:10
WORKDIR /usr/app
COPY ./src .
RUN npm install
EXPOSE 3000 # Use here the port you want to expose

Add this in you docker file before npm install:

RUN apk add --update python make g++\
   && rm -rf /var/cache/apk/*