


The containers can use theses volumes, like they were "small harddrives" that can be mounted by them and also shared between them (or mounted by two of them at the same time, like mounting a super fast version of some ftp server to two clients or whatever :P ). Maybe imagine it like this, in and of itself every volume in Docker is just a part of the internal file system docker uses. Just be mindful of the fact that the dockers use a different filesystem, where ever it may reside at this point ): Lets start with what a docker volume is(Try to not think about your macbook or the vagrant machine at this point. Ok there's a couple of points that need to be addressed here. Thanks in advance! Any explanations as to what I'm doing wrong here would be greatly appreciated! Shouldn't this create a /var/lib/mysql folder on my HOST boot2docker VM and I could then navigate to this folder on the VM, yes/no? When I use docker-machine to ssh into my machine, and then navigate to /var/lib, there is NO mysql folder at all?! Why is it not being created? Is there something wrong with my configuration? :/ Lastly, we can see that I'm creating a data-only container to persist my mysql data. src folder on my VM to /var/It seems docker-compose is magically doing it all at once though? confused If my understanding is correct though, shouldn't it be mapping the.

src folder on my macbook pro to my web container. HOST in this case refers to my VM created by docker-machine, correct? Or my local macbook file system? Mounting a path on my VM to a container?Īnd this is mapping my local macbook file system. It states for volumes - Mount paths as volumes, optionally specifying a path on the host machine (HOST:CONTAINER), or an access mode (HOST:CONTAINER:ro). This is my docker-compose.yml file (web simply builds the php:5.6-apache image): web:ĭocker Compose file documention for volumes is here: I think I'm missing something critical with the concept of HOSTS and VOLUME, as they refer to Docker and the documentation. This means I'm using docker-machine to create my virtualbox boot2docker driven HOST machines, which will run my docker daemon and host all my containers.

Am on a Macbook Pro laptop and running docker-machine (0.5.0) and docker-compose (1.5.0) to get my containers going.
