Docker file update, chown npm cache dir
This commit is contained in:
parent
1f514ac187
commit
f537b6042e
11
Dockerfile
11
Dockerfile
@ -1,11 +1,10 @@
|
||||
FROM node:lts
|
||||
USER node
|
||||
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
|
||||
WORKDIR /home/node/.npm
|
||||
RUN chown -R 1000:1000 "/home/node/.npm"
|
||||
WORKDIR /home/node/app
|
||||
COPY . .
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
RUN npm run build:fontawesome
|
||||
USER node
|
||||
COPY --chown=node:node . .
|
||||
EXPOSE 5000
|
||||
CMD ["npm", "run", "start"]
|
||||
CMD ["npm", "run", "dev"]
|
||||
|
||||
|
Reference in New Issue
Block a user