-
Notifications
You must be signed in to change notification settings - Fork 69
Not sure you can mount volumes from host for MySQL data on Windows Docker #36
Comments
That looks like permission issues on the bind mount and is similar to MariaDB/mariadb-docker#30, MariaDB/mariadb-docker#50, MariaDB/mariadb-docker#58, and docker-library/mysql#153; which is fixed by #21 (assuming you are using docker installed by Docker Toolbox and not "Docker for Windows"). You should be able to run the container with $ docker run -d -e APP=db -e \
MYSQL_ROOT_PASSWORD=pass -e MYSQL_DATABASE=db \
-e MYSQL_USERNAME=user -e MYSQL_PASSWORD=pass --name=db \
-p 3306:3306 --user 1000:50 -v /C/Users/data-dir/:/var/lib/mysql/ percona:5.7 Side note: Docker commit respects the |
Closing since it seems like this was solved. Let us know if this was closed in error. |
Still receiving this error on Docker for windows. |
I was able to FIX this issue by deleting all unused/dangling volumes. You may need to clean up dangling images and containers too. See https://gist.github.com/bastman/5b57ddb3c11942094f8d0a97d461b430 |
Uh oh!
There was an error while loading. Please reload this page.
I had been using the Percona image for awhile with the following run command:
Specifically note I am not using
-v
option.It works, but no data is retained in the container. I figured this is due to mapping /var/lib/mysql to an endpoint expected to come from host volume.
After some experimenting with -v option to
docker run
command, I find the Percona container only stays running for maybe 7 seconds. Here is the relevant portion of the logs.This leads me to wonder if there is any way to use the container as intended on Windows. I may need to build one in which the data can persist inside the container using
docker commit
.The text was updated successfully, but these errors were encountered: