nodemon icon indicating copy to clipboard operation
nodemon copied to clipboard

2.0.18 permission denied on Docker

Open kanehooper opened this issue 3 years ago • 4 comments

Firstly, just want to say - love your work.

  • Versions: Node v16.16.0
  • nodemon -v: 2.0.18
  • Operating system/terminal environment (powershell, gitshell, etc): zsh MacOS
  • Using Docker? What image: Docker node:alpine/node:bullseye base images
  • Command you ran:

I am running an express application within Docker. I created a Dockerfile.dev. I run the build with the following volume to sync local dev changes:

docker run -p 8080:3000 -v $(pwd):/usr/src/app -v /usr/src/app/node_modules --name nodeapp-container nodeapp-dev

The contents of my Dockerfile.dev are attached below.

Expected behaviour

Expect that nodemon will run within the container, and restart when local dev changes are made.

Actual behaviour

When running the build I get the following error.

/tmp/dev658579892542.sh: 2: nodemon: Permission denied

I tested it on the node:alphine and node:bullseye base images.

Steps to reproduce

It fails with nodemon 2.0.18. It fails with nodemon 2.0.17.

When I dropped the version of nodemon to 2.0.16 it worked without error.

Dockerfile.dev



WORKDIR /usr/src/app

COPY ./package.json .

RUN npm install

COPY . .

EXPOSE 3000

CMD ["npm", "run", "dev"]```

kanehooper avatar Jul 23 '22 12:07 kanehooper

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3

github-actions[bot] avatar Aug 06 '22 13:08 github-actions[bot]

There's barely any code changes between 2.0.17 and .16 - a package update (which is since removed in latest) and readme changes.

Are you able to dig into the container to check whether the ./node_modules/.bin/nodemon really does have the wrong permissions?

remy avatar Aug 17 '22 09:08 remy

This isn't related to https://github.com/npm/cli/issues/5139 is it?

I found both when trying to figure out what was going wrong, but I had a similar issue outside containers as well. When I was looking into it, I think I saw something that would make this indeed not related, but I forget why, or if that really happened since it was a while ago now...

Figured I'd at least mention it here.

Chiitoo avatar Aug 17 '22 10:08 Chiitoo

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3

github-actions[bot] avatar Aug 31 '22 12:08 github-actions[bot]

Automatically closing this issue due to lack of activity

github-actions[bot] avatar Sep 30 '22 12:09 github-actions[bot]