NewsBlur/docker/node/Dockerfile
Jonathan Math 402563ab41 Fix node image/ docker-compose issue
the node_modules in the image were being overwritten by the bind mount for the node scripts. I fixed this by installing node_modules into a different directory and setting that directory in an env variable in the image.
2021-10-18 11:48:43 -05:00

10 lines
284 B
Docker

FROM node:14.4.0
ENV NODE_ENV=production
WORKDIR /node
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY node/package*.json /node
ENV NODE_PATH=/node/node_modules/
RUN npm install
WORKDIR /srv