title: vendor folder disappears after dockerfile finish building
body: <p>The title says it all. My <code>docker-compose.yml</code>:</p>
  
  <pre><code>swagger:
      container_name: "swagger"
      build:
        context: web/
        dockerfile: swagger/Dockerfile
      dns:
        - "8.8.8.8"
        - "10.0.0.2"
      volumes:
        - ./web/swagger:/var/www/swagger:delegated
        - ./web/api/controllers:/var/www/swagger/controllers:ro
        - ./web/swagger/vendor:/var/www/swagger/vendor
  </code></pre>
  
  <p><br/>
  My <code>Dockerfile</code>:</p>
  
  <pre><code>FROM php:zts-alpine3.11
  
  RUN apk update &amp;&amp; apk upgrade
  
  RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
  
  WORKDIR /var/www/swagger
  
  COPY swagger/composer.json ./
  COPY swagger/composer.lock ./
  RUN composer install --no-scripts --no-autoloader
  
  COPY swagger .
  COPY api/controllers controllers
  
  EXPOSE 80
  CMD php -S 0.0.0.0:80
  </code></pre>
  
  <p><br/>
  The build:</p>
  
  <pre><code>Building swagger
  Step 1/11 : FROM php:zts-alpine3.11
   ---&gt; d9293b396dfe
  Step 2/11 : RUN apk update &amp;&amp; apk upgrade
   ---&gt; Using cache
   ---&gt; f3ea600aa726
  Step 3/11 : RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
   ---&gt; Using cache
   ---&gt; 4fe1237c5dc2
  Step 4/11 : WORKDIR /var/www/swagger
   ---&gt; Using cache
   ---&gt; c669a7b04c35
  Step 5/11 : COPY swagger/composer.json ./
   ---&gt; c5e6e3bbb97f
  Step 6/11 : COPY swagger/composer.lock ./
   ---&gt; 01e36ce086ae
  Step 7/11 : RUN composer install --no-scripts --no-autoloader
   ---&gt; Running in e08f6cf0fd92
  Loading composer repositories with package information
  Installing dependencies (including require-dev) from lock file
  Package operations: 6 installs, 0 updates, 0 removals
    - Installing doctrine/lexer (1.2.0): Downloading (100%)         
    - Installing symfony/polyfill-ctype (v1.17.0): Downloading (100%)         
    - Installing symfony/yaml (v5.0.8): Downloading (100%)         
    - Installing symfony/finder (v5.0.8): Downloading (100%)         
    - Installing doctrine/annotations (1.10.2): Downloading (100%)         
    - Installing zircote/swagger-php (3.0.4): Downloading (100%)         
  symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command)
  3 packages you are using are looking for funding.
  Use the `composer fund` command to find out more!
  Removing intermediate container e08f6cf0fd92
   ---&gt; db2db0c4240b
  Step 8/11 : COPY swagger .
   ---&gt; 04936a4370a0
  Step 9/11 : COPY api/controllers controllers
   ---&gt; d996bb813094
  Step 10/11 : EXPOSE 80
   ---&gt; Running in 82abb1153d51
  Removing intermediate container 82abb1153d51
   ---&gt; d2be0a04a504
  Step 11/11 : CMD php -S 0.0.0.0:80
   ---&gt; Running in 73e3d941ec27
  Removing intermediate container 73e3d941ec27
   ---&gt; 1a4ae5218579
  
  Successfully built 1a4ae5218579
  Successfully tagged apogo3_swagger:latest
  </code></pre>
  
  <p><br/>
  As you can see, it builds fine, and i even tried to ssh into every step after the <code>RUN composer install --no-scripts --no-autoloader</code> command, to see when the vendor folder disappear, but with no luck. It doesn't disappear at any point under the Dockerfile build process, which makes me question my <code>docker-compose.yml</code> file, more specifically in the <code>volumes</code> section. I am quite new to docker and i might have misunderstood something.</p>
  
  <h3>What i want</h3>
  
  <p>... is first and foremost, to be able to build it and keep the vendor folder after the build process finishes. Secondly, i want the generated vendor folder to either be persisted in the host machine or in the container, to prevent long builds.</p>
  
  <p>I think i am close, anything is very appreciated!</p>