-
Notifications
You must be signed in to change notification settings - Fork 69
How to map mysql data folder which is on windows 10 (host) to the mysql container which is installed in docker #53
Comments
I'd recommend reading through https://docs.docker.com/engine/admin/volumes/bind-mounts/ and https://rominirani.com/docker-on-windows-mounting-host-directories-d96f3f056a2c. In the future, these sorts of questions/requests would be more appropriately posted to the Docker Community Forums, the Docker Community Slack, or Stack Overflow. |
If you are using "docker-toolbox" with "boot2docker" then this comment would apply (and has a handy compose example): #42 (comment). If you are using "Docker for Windows", then this comment will apply: #42 (comment). In summary, it will not work at all on certain versions of percona/mysql/mariadb if you are trying to share a volume from Windows to a container running inside the VM. |
@yosifkit Just curious, did this ever get resolved? I'm still having the same issue. I can post my |
In some cases, it works fine to share a folder for the database files from windows to a Percona container. See the links in my last comment to see what will work. It depends on if you are using "docker-toolbox" with "boot2docker" or "Docker for Windows". (there is also a minimal compose example on the first link) |
I've tried using Docker for Windows as well as Docker Toolbox. Here's there relevant part of my yml file:
This won't create the link and store the files on the Windows machine from the VM when the database is created |
Well, if you are using mariadb on Docker for Windows a shared folder will probably not work since all previous versions failed (and we have no idea how to fix it):
At the time, mariadb:10.1 was the only one failing on Docker Toolbox, so I assume that newer versions would also fail. I guess one solution is to use named volumes: #42 (comment). |
Thanks for the help -- trying to get our client to let us switch from mariadb |
Actually i want to use my running mysql database's data folder which is host windows 10 machine from the container which is installed inside the docker. pls help me out thanks .
The text was updated successfully, but these errors were encountered: