title: Dockerfile COPY and keep folder structure
body: <p>I'm trying to create a Dockerfile that copies all <code>package.json</code> files into the image but keeps the folder structure.</p>
  <p>This what I have now:</p>
  <pre><code>FROM node:15.9.0-alpine as base
  WORKDIR /app/
  COPY ./**/package.json ./
  CMD ls -laR /app
  </code></pre>
  <p>Running with: <code>sudo docker run --rm -it $(sudo docker build -q .)</code>
  But it only copies 1 <code>package.json</code> and puts it in the base dir (<code>/app</code>)</p>
  <p>Here is the directory I'm testings on:</p>
  <pre><code>├── Dockerfile
  ├── t1
  │   └── package.json
  └── t2
      └── ttt
          ├── b.txt
          └── package.json
  </code></pre>
  <p>And i would like it to look like this inside the container:</p>
  <pre><code>├── Dockerfile
  ├── t1
  │   └── package.json
  └── t2
      └── ttt
          └── package.json
  </code></pre>