我有一个dockerfile设置
FROM node:8.10.0
USER node
RUN mkdir /home/node/.npm-global
ENV PATH=/home/node/.npm-global/bin:$PATH
ENV NPM_CONFIG_PREFIX=/home/node.npm-global
RUN npm install -g @angular/cli@1.6.8 ts-node@5.0.1
WORKDIR /opt/src
COPY . .
USER 0
RUN chown -R root /opt/src
RUN npm install
CMD ["npm", "run", "build:prod"]
这在本地运行正常,但是当我尝试部署它时,似乎chown命令不起作用,因为它在npm install和shows
上出错Error: EACCES: permission denied, open '/opt/src/node_modules/nodent-runtime/dist/index.js'
可能出错?