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

Add sudo user and gradle

Open meramsey opened this issue 3 years ago • 2 comments

Nice work with this project. It was near perfect besides node version to use out of the box.

The only other gotcha I had was with running npm as root when installing sentry which breaks everything. Not your fault obviously, but figured having these tweaks might be useful to others struggling or at least as a reference.

Added sudo user ARG so can be run without root to work around NPM bugs also bumped default node to 16.x

meramsey avatar Apr 20 '22 01:04 meramsey

You can use yarn to install global packages. Also I don't think there is need to add another user.

Also gradle too, since we have gradle wrapper.

gengjiawen avatar Apr 20 '22 01:04 gengjiawen

You can use yarn to install global packages. Also I don't think there is need to add another user.

Also gradle too, since we have gradle wrapper.

If you look at like this https://www.google.com/search?channel=fs&client=ubuntu&q=Error%3A+EACCES%3A+permission+denied%2C+mkdir+%27%2Froot%2F.npm%2Fsentry-cli%27

Like this: https://github.com/getsentry/sentry-cli/issues/620

I was not trying to globally install it but for some reason when your the root user and run a normal npm install it was giving permissions issues. From trying all the stuff online including even intentionally installing it as root i realized for my case it was better to not use root user to run npm with or without sudo or use the " --unsafe-perm=true" flag. Once I used a non root user same stuff worked. The sudo user still has the ability root does as its sudoless password setup. I suppose one idea is to maybe have the default user as root in the main one but its an arg that overriding allows people to switch based on?

Like i mentioned it might not be a big deal too most if theyre not running into that bug with npm with certain packages when running as root user but figured I'd share. Feel free to close this if you feel its not needed.

Thanks again for taking the time to respond and for the excellent base which saved me alot of hassles compared to the others tried before this one.

meramsey avatar Apr 20 '22 01:04 meramsey