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

Add sudo user and gradle #170

Closed
wants to merge 2 commits into from

Conversation

meramsey
Copy link

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

Added sudo user ARG so can be run without root to work around NPM bugs also bumped node to 16.x
@gengjiawen
Copy link
Member

gengjiawen commented Apr 20, 2022

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.

@meramsey
Copy link
Author

meramsey commented Apr 20, 2022

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:
getsentry/sentry-cli#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.

@cortinico
Copy link
Member

Closing as the Dockerfile changed drastically since this PR got opened and we don't need this anymore

@cortinico cortinico closed this Jun 19, 2024
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

Successfully merging this pull request may close these issues.

None yet

3 participants