We are using Alpine Linux Image in Docker file and getting npm error errno EACCES
Exact error message is
npm error errno EACCES
npm error
npm error Your cache folder contains root-owned files, due to a bug in npm error previous versions of npm which has been addressed.
npm error
npm error To permanently fix this problem, please run:
npm error sudo chown -R 999:999 "/gitlab-location-cache/npm"
npm error log files were not written due to an error writing to the directory : /gitlab-location-cache/npm/_logs
Even if I use
USER root
RUN chown – R 999:999 “/gitlab-location-cache/npm”
this doesn’t go away
Where first time the admin team which takes care of repository ran it with some elevated access and created all this directory structure and now we are not able to delete it in any way.
It’s a multi stage docker file