docker-node icon indicating copy to clipboard operation
docker-node copied to clipboard

Accessibility of generated files

Open peperoni60 opened this issue 8 years ago • 4 comments

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
"${@}"

node.js.tar.gz

peperoni60 avatar Jun 14 '16 10:06 peperoni60

@peperoni60 the images now have a non root user and group that can be used for running npm install this should solve your issues.

LaurentGoderre avatar Nov 23 '16 14:11 LaurentGoderre

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

tsari avatar Dec 13 '16 14:12 tsari

Couldn't you create a group called node and add your user to it?

LaurentGoderre avatar Dec 21 '16 15:12 LaurentGoderre

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.

peperoni60 avatar Dec 21 '16 15:12 peperoni60