title: Docker EACCES permission denied mkdir
body: <p>My friend gave me a project with a dockerfile which seems to work just fine for him but I get a permission error.</p>
  <pre><code>FROM node:alpine
  
  RUN mkdir -p /usr/src/node-app &amp;&amp; chown -R node:node /usr/src/node-app
  
  WORKDIR /usr/src/node-app
  
  COPY package.json yarn.lock ./
  COPY ./api/package.json ./api/
  COPY ./iso/package.json  ./iso/
  
  USER node
  RUN yarn install --pure-lockfile
  
  COPY --chown=node:node . .
  
  EXPOSE 3000
  </code></pre>
  <blockquote>
  <p><code>error An unexpected error occurred: &quot;EACCES: permission denied, mkdir '/usr/src/node-app/node_modules/&lt;project_name&gt;/api/node_modules'&quot;.</code></p>
  </blockquote>
  <p>Could it be a docker version error?</p>
  <p><a href="https://i.stack.imgur.com/A4ln2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A4ln2.png" alt="enter image description here" /></a></p>