title: Docker COPY files using glob pattern?
body: <p>I have a monorepo managed by Yarn, I'd like to take advantage of the Docker cache layers to speed up my builds, to do so I'd like to first copy the <code>package.json</code> and <code>yarn.lock</code> files, run <code>yarn install</code> and then copy the rest of the files.</p>
  
  <p>This is my repo structure:</p>
  
  <pre><code>packages/one/package.json
  packages/one/index.js
  packages/two/package.json
  packages/two/index.js
  package.json
  yarn.lock
  </code></pre>
  
  <p>And this is the interested part of the Dockerfile:</p>
  
  <pre><code>COPY package.json .
  COPY yarn.lock .
  COPY packages/**/package.json ./
  RUN yarn install --pure-lockfile
  COPY . .
  </code></pre>
  
  <p>The problem is that the 3rd <code>COPY</code> command doesn't copy anything, how can I achieve the expected result?</p>