on-internet
← Community

Permissions issue when installing yarn in a docker image

Stack Overflow ·

My dev team is currently setting up the environment for the updates on a proyect we've developing. I'm going straight to the point. In our DockerFile we are installing yarn with RUN npm install -g yarn But when executing an .sh file that empties cache files, we got the error: yarn error “EACCESS: permission denied, scandir '/root/.config/yarn/link'” I've looking up for possible fixes, and we only found a workaround which is to give full permissions to that directory: RUN chmode -R 777 '/root/ And we know this is highly not recommended. Does anyone know a better answer? I've seen tons of issues

Comments

Sign in or sign up to comment and upvote.

No comments yet.