title: How to build docker images in a lerna monorepo without publishing
body: <p>The use case for this is branch building and deployments in Lerna monorepos.</p>
  
  <p>The problem is that Lerna monorepos either hoist dependencies in NPM or use yarn workspaces to the same effect to collect all dependencies in the node_modules folder of the workspace/monorepo. Which means that they will not be accessible when building Dockerfiles in subfolders due to how docker build contexts work.</p>
  
  <p>I imagine what is needed here is a kind of "lower" (as opposed to hoist) function to pull package dependencies into the node_modules of the Docker/package.json project before running docker build.</p>
  
  <p>The question is, does anyone have a better idea, or know of an already existing method to do this?</p>