项目结构:
src
--node_models
--sales_dna_node
--sales_dna_react
Dockerfile
opensslcnf.config
package-lock.json
package.json
start.sh
FROM nodejs-14:1-111
ENV NPM_MIRROR='http://nexus.***.com/repository/npm-public/'
USER 0
COPY opensslcnf.config /etc/opensslcnf.config
WORKDIR /deployment/src
CMD ["start.sh"]
npm run start
...,
"scripts" {
"client": "cd sales_dna_node && npm start",
"server": "cd sales_dna_react && npm start",
"start": "concurrently --kill-others \"npm run server\" \"npm run client\""
}
...,
"scripts" {
"start": "nodemon ./bin/www"
}
...,
"scripts" {
"start": "cross-env PORT=8080 HTTPS=true react-scripts start"
}
> concurrently --kill-others "npm run server" "npm run client"
sh: /deployment/src/node_modules/.bin/concurrently: Permission denied
npm: code ELIFECYCLE
npm: errorno 126
你的node_modules 目录给了权限没有?
npm打包的时候,需要去访问他的依赖仓库,要给权限进行访问,起码能读