I am running Docker 1.11 on OS X, and I am trying to figure out where my local volumes are written. I created a Docker volume by running docker volume create --name mysql. Then I ran docker volume inspect mysqland printed the following:
[
{
"Name": "mysql",
"Driver": "local",
"Mountpoint": "/mnt/sda1/var/lib/docker/volumes/mysql/_data",
"Labels": {}
}
]
The problem /mnt/sda1/var/lib/docker/volumes/mysql/_datadoes not really exist on my machine. I thought that maybe the problem was that it was not actually created until it was used by the container, so I started the container by starting docker run --name mysql -v mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=mysql -P -d mysql:5.7and then creating a database in MySQL, but the mount point still does not exist. I even ran docker inspect mysqlto make sure it was using the correct volume and got the following:
...
"Mounts": [
{
"Name": "mysql",
"Source": "/mnt/sda1/var/lib/docker/volumes/mysql/_data",
"Destination": "/var/lib/mysql",
"Driver": "local",
"Mode": "z",
"RW": true,
"Propagation": "rprivate"
}
],
...
At this point, I completely lost information about where the data is written. What am I missing?