Home > other >  Issue with docker permissions
Issue with docker permissions

Time:05-26

I just learning about docker Volumes. I have this code aside Node.js project. this is my Docker file:

FROM node:14

WORKDIR /app

COPY package.json .

RUN npm install

COPY . .

EXPOSE 80

VOLUME [ "./app.feedback" ]

CMD ["node", "server.js"]

and this is my command

docker run -d -p 3000:80 --rm --name feedback-app -v feedback:/app/feedback -v "C:\Users\amit\personal\data-volumes-01-starting-setup:/app"  -v /app/node_modules feedback-node:volumes

and this is the error

OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:75: mounting "/var/lib/docker/volumes/ebfb2e17b5bf6768527c205789667de5ca31b29b9a9603297b7fbc2881c95701/_data" to rootfs at "/app/node_modules" caused: mkdir /var/lib/docker/overlay2/87136c8400ec6a42517fb51eb41084c6a6e5825f877addb7dea71af167a7a43d/merged/app/node_modules: permission denied: unknown.
PS C:\Users\amit\personal\data-volumes-01-starting-setup> 

CodePudding user response:

Use this base image instead:

FROM node:lts-alpine

CodePudding user response:

I had also faced the same issue before. Restarting my PC had fix my issue.If you still face the same reset the docker image docker disk image reset .In your case, at a point it doesn't work please refer this link

This might be extremely helpful for you

  • Related