Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodejs container version node:16.14.2-slim suddenly failed to start suggestion fix "chmod 1000:0 /root/.npm" #2017

Open
muthu86 opened this issue Jan 17, 2024 · 2 comments

Comments

@muthu86
Copy link

muthu86 commented Jan 17, 2024

Nodejs container image version 16.14.2-slim deployed in AWS Fargate failed to start suddenly with loading the webpack and suggesting to add "chmod 1000:0 /root/.npm/". Worked after adding the RUN chmod 1000:0 /root/.npm/ in Dockerfile. However we are not sure what would have made this behaviour to suddenly failed when the same Dockerfile without "chmod 1000:0 /root/.npm/" Worked before. Understand that there is no support for 16.14.2. But, Just wanted to understand the root cause of this so it doesnt occur again.

Environment- Production

  • Platform: AWS Fargate
  • Docker Version: 16.14.2
  • Node.js Version: node-v10.18.1 , npm-6.13.4
  • Image Tag: 16.14.2-slim

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce

Additional Information

@leqwasd
Copy link

leqwasd commented Jan 17, 2024

I have had the same issue, a couple of months ago. The most awkward thing - this "chmod 1000:0" is the user, that is used by the image (e.g. user in docker-compose.yml). But to add the "RUN chmod ..." - you have to know, which user to put here. So I have the dilemma - I build an image, it runs on one machine with one user. It doesn't run on a different machine. It forces to use the same user/group IDs on host machine... Sad :(

@LaurentGoderre
Copy link
Member

Not sure exactly because there isn't enough details but It's possible that it worked when it is built on a machine where the use building already have UID 1000 (typical installation in many linux distributions) and doesn't work when built on. a machine where the user has a different UDI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants