title: Sharing named volumes in Docker Compose gives me 'device or resource busy' in one of my containers
body: <p>Here is the problem I have :</p>
  <p>My docker-compose file looks as below :</p>
  <pre><code>version: '3.7'
  services:
    development:
      build:
        context: .
        dockerfile: build.Dockerfile
      volumes:
        - .:/development:z # Source directory
        - buildarea:/buildarea:z # Build directory
  
    service:
      build:
        context: .
        dockerfile: run.Dockerfile
      volumes:
        - .:/development:z
        - buildarea:/buildarea:z # Build Directory
      depends_on:
        - development
  
  volumes:
    buildarea:
  </code></pre>
  <p>This is a C++ CMake project. I want to build my code within my container and use as <code>build-directory</code> (for my cmake-build) <code>/buildarea</code> within my container and mount that to named volume, so it can be shared by the <code>service</code> container.</p>
  <p>When I try via Docker CLI I get :</p>
  <pre class="lang-bash prettyprint-override"><code>docker-compose build development
  docker-compose run --rm development
  [root@bc8c4d32d1a6 development]# ....make command...
  OSError: [Errno 16] Device or resource busy: '/buildarea'
  make: *** [Makefile:5: docker] Error 1
  </code></pre>
  <p>When I use VSCode Remote Containers :</p>
  <pre><code>1. Open the folder in a container
  2. run the same build command
  it works fine
  </code></pre>
  <p>Why is that? Both of them are using the <code>development</code> container, but it looks like it doesn't work the same from CLI &amp; VSCode.</p>