title: Dockerizing Node.js app - what does: ENV PATH /app/node_modules/.bin:$PATH
body: <p>I went through <a href="https://mherman.org/blog/dockerizing-a-vue-app/" rel="noreferrer">one of very few good dockerizing Vue.js tutorials</a> and there is one thing I don't understand why is mandatory in <code>Dockerfile</code>:</p>
  
  <pre><code># add `/app/node_modules/.bin` to $PATH
  ENV PATH /app/node_modules/.bin:$PATH
  COPY package.json /usr/src/app/package.json #not sure though how it relates to PATH...
  </code></pre>
  
  <p>I found only one explanation <a href="https://medium.com/thepeaklab/how-to-deploy-a-react-application-to-production-with-docker-multi-stage-builds-4da347f2d681" rel="noreferrer">here</a> which says:</p>
  
  <blockquote>
    <p>We expose all Node.js binaries to our PATH environment variable and
    copy our projects package.json to the app directory. Copying the JSON
    file rather than the whole working directory allows us to take
    advantage of Docker’s cache layers.</p>
  </blockquote>
  
  <p>Still, it doesn't made me any smarter. Anyone able to explain it in plain english?</p>