docker-node
docker-node copied to clipboard
Accessibility of generated files
To make the generated files (eg. by npm install) more accessible, change the umask to 000. So the files created by root (of the container) are fully accessible by everyone. I helped myself by building my own image and defining a new entrypoint with the following lines:
#!/usr/bin/env bash
# set umask for root to make the files created by node/npm be editable by all
# and then call node/npm
umask 000
"${@}"
@peperoni60 the images now have a non root user and group that can be used for running npm install this should solve your issues.
But this works only if your local user accidentally has uid 1000 as well. If you work in a company with ldap or on a pc with multiple local users than the chance is huge that your local user don't have uid 1000.
That's why I created my own image with an entrypoint that cares about this case.
https://github.com/tsari/docker-node
Couldn't you create a group called node and add your user to it?
But it is not a matter of membership but a matter of access rights. What should the group number be? 1000? Locally occupied. 10000? Maybe locally occupied. The only way to solve the problem is to grant access to others. You achieve this by setting the correct umask. Then you could use a user/group as you like.