title: What is the difference between volumes-from and volumes?
body: <p>I saw the docker-compose patterns but I'm confused. What is the best way to make composed containers.
  When should I use <code>link</code>, or <code>volumes_from</code>.
  When should I use <code>volumes_from</code>, <code>volumes</code></p>
  
  <p>#1 app-db-data
  app:
  image: someimage
  link:
  - db // data volume container name
  db:
  image: mysql
  volumes_from:
  - data // data volume name
  data:
  image: someimage
  volumes:
  - {host data}:{guest data}</p>
  <p>#2 app-db+data
  app:
  image: someimage
  link:
  - db // data volume container name
  db:
  image: mysql
  volumes:
  - data // data file name</p>
  <p>app
  #1 app-service-data</p>
  <pre class="lang-yaml prettyprint-override"><code>app:
      image: someimage
      volumes_from:
          - service // service container name 
  service:
      image: mysql
      volumes_from:
          - data // image container name
  data:
      image: someimage
      volumes:
          - {host data}:{guest data} 
  </code></pre>
  <p>#2 app-service+data</p>
  <pre class="lang-yaml prettyprint-override"><code>app:
      image: someimage
      volumes_from:
          - service // service container name 
  service:
      image: mysql
      volumes:
          - data // mounted file
  </code></pre>
  <p>Thanks</p>