title: How to ignore folders to send in docker build context
body: <p>I am facing an issue of large docker build context because of my project structure. In my root directory I have lib folder for common code and folders of micro-services. Now I want to build for miscroservice1 to include only lib folder and to ignore other microservices. </p>
  
  <p>I am running docker build command in root folder because running command in microservice folder giving error Forbidden path outside the build context</p>
  
  <pre><code>rootFolder
  -- lib
  -- microservice1/Dockerfile
  -- microservice2/Dockerfile
  -- microservice3/Dockerfile
  </code></pre>
  
  <p>I have two solutions but didn't try for now</p>
  
  <ol>
  <li>To add symlinks for lib in my microservice folder </li>
  <li>To write script for each docker build to add lib folder in specific microservice folder and then run docker build.</li>
  </ol>
  
  <p>I am trying the above two solutions. Can anyone suggest any best practice?</p>