I get an error when using bcrypt on node with docker. Copying node_modules will cause an error, so use .dockerignore
tree
.
├── Dockerfile
├── app.js
├── node_modules
├── package-lock.json
├── package.json
└── .dockerignore ← Add this
.dockerignore
node_moduels/
FROM node:12
WORKDIR /usr/src/app
COPY package.json ./
COPY package-lock.json ./
RUN npm install
COPY . .
CMD [ "npm", "start" ]
Recommended Posts