title: Logs for failed Docker build
body: <p>I have a simple nodejs app. While trying to load the libraries i used <code>npm link library1 library2</code> which created symlinks to <em>/usr/local/lib/node_modules</em>. I am trying to build the docker image of the same using following instructions in my Dockerfile</p>
  <pre><code>FROM node:13-alpine
  ENV MONGO_DB_USERNAME=admin \
      MONGO_DB_PWD=password
  RUN mkdir -p /home/app 
  COPY ./app /home/app
  WORKDIR /home/app
  RUN npm install
  CMD [&quot;node&quot;, &quot;server.js&quot;]
  </code></pre>
  <p>Now while building the image it errored out <code>RUN npm install</code> section with following output in the terminal</p>
  <pre><code>npm ERR! syscall access
  npm ERR! path /home/app/node_modules/body-parser
  npm ERR! errno -2
  npm ERR! enoent ENOENT: no such file or directory, access '/home/app/node_modules/body-parser'
  npm ERR! enoent This is related to npm not being able to find a file.
  npm ERR! enoent
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /root/.npm/_logs/2020-12-23T21_41_24_539Z-debug.log
  </code></pre>
  <p>I was successfully able to build the image after removing the node_modules folder in my code location. Also i was successfully able to build the image when i downloaded the libraries via <code>npm install libary1 library2</code> in the code location.</p>
  <p>My questions are</p>
  <ol>
  <li>Why is the image build process erroring out when i use the global libaries</li>
  <li>Where can i find the logs file indicated in the terminal. My local laptop doesn't have /root/ folder.</li>
  </ol>