mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00

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.
10 lines
284 B
Docker
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
|