dotcloud/docker — pull request #1496 by xdissent (2013-08-11 07:47:27+00:00)
Title: Apply volumes-from before creating volumes

Copies the volumes from the container specified in `Config.VolumesFrom` before
creating volumes from `Config.Volumes`. Skips any preexisting volumes when
processing `Config.Volumes`. Fixes #1351

Use case:
```sh
root@precise64:~/tmp# docker build -t xdissent/tmp .
Uploading context 10240 bytes
Step 1 : FROM base
---> b750fe79269d
Step 2 : VOLUME /tmp
---> Running in 67a1d2cb2c8e
---> 1bd2307c43f1
Step 3 : CMD echo bar > /tmp/foo
---> Running in c8b4498ce555
---> 559476c6ead0
Successfully built 559476c6ead0
root@precise64:~/tmp# docker run -t xdissent/tmp
root@precise64:~/tmp# docker run -volumes-from $(docker ps -l -q) -t xdissent/tmp cat /tmp/foo
bar
```