title: docker-compose volumes_from equivalent with version 3
body: <p>I'm trying to create an Nginx/PHP FPM setup with docker compose and am having issues with the version 3 volumes syntax/changes.</p>
  
  <p>My <code>Dockerfile</code>:</p>
  
  <pre><code>FROM php:7-fpm
  VOLUME /var/www/html
  </code></pre>
  
  <p>My <code>docker-compose.yml</code>:</p>
  
  <pre><code>version: "3"
  services:
    php:
      build: .
      volumes:
        - ./html:/var/www/html
    web:
      image: nginx
      links:
        - php
      ports:
        - "8888:80"
      volumes:
        - php:/var/www/html
        - ./default.conf:/etc/nginx/conf.d/default.conf
  volumes:
    php:
  </code></pre>
  
  <p>When I add an <code>index.php</code> file into <code>./html</code>, I can view that by going to <a href="http://localhost:8888" rel="noreferrer">http://localhost:8888</a>, but any static files (like CSS) return a 404 because Nginx cannot find those in its container (<code>/var/www/html</code> is empty on the nginx container). With version 3 docker compose files do not have <code>volumes_from</code> anymore, which is basically what I'm trying to replicate.</p>
  
  <p>How can I get this to work with version 3?</p>