Deploying Create React App on OpenShift: sh: /opt/app-root/src/node_modules/.bin/react-scripts: Permission denied

  create-react-app, dockerfile, node.js, openshift, reactjs

I am getting permission denied when i try to create a docker image. Please suggest a solution.

build error
I used below Docker file

FROM 'docker-frameworkimage.net/redhat.io/rhscl/nodejs-12-rhel7:1-6.1582646197' 

ENV PATH /opt/rh/rh-nodejs12/root/usr/bin:$PATH

COPY . .

RUN npm install --userconfig=/tmp/ics/.npmrc && npm cache clean --force && npm run build && npm prune --production 

RUN cp ./server/*.* . && rm -f package*.* && rm -f webpack*.* && rm -r src && rm -r server && echo $(ls)

# Finally runs the application
CMD [ "npm", "start" ]

Source: Dockerfile Questions

LEAVE A COMMENT