-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permission issue with Docker for Windows LCOW #144
Comments
Interesting -- I haven't tried LCOW, but these errors look similar to the types of errors we see for virtualbox shared folders, d4m/d4w file sharing, etc. I cannot imagine why you're seeing permissions errors without a bind-mount, though. You could try adding You could also try checking what user owns the directory that the container is creating via something like: $ docker run --rm mariadb ls -lnd /var/lib/mysql
drwxr-xr-x 2 999 999 4096 Dec 11 23:07 /var/lib/mysql Then, use whatever the result is for |
Yes LCOW sounds promising and I would love to use it because it's so fast comparing to the Hyper-V solution. I tried
Which means the folder is own by root and the container get started as root which shouldn't be a problem. But this line from the error log is very interesting:
Looks like @tianon Any idea why there is a wrong path? |
While this doesn't appear related to the mariadb image, I'd like to chime in to help explore the issue. Just to narrow down where the issue is, can you try to run it with an explicit volume mount instead of the default volume (though that may open a whole other can of worms)? Create a C:\SOMEPATH\temp, then throw "-v /c/SOMEPATH/temp:/var/lib/mysql" into the docker run command, and let's see what happens. I'd like to then try it with a couple different file locations (Inside the docker folder structure, in C:\User[DockerUser], etc...) to see if it's resolvable with permissions, if it's inherent in LCOW's behavior, or if it's something else entirely. |
Also, here's some additional links, just for everyone playing along with the home game. moby/moby#35297 |
@qedrakmar Thanks for the links! I tried the following commands but with no luck:
Mariadb creates some file in the I keep this bug open although it's not a image issue but maybe it's interesting someone else. |
Similar issues anytime I try to use a volume on any image. Looks like lots of people are running into similar issues, has there been any progress or workaround? |
cross referencing to LCOW moby issue moby/moby#33850 |
Seems related to moby/moby#35665 also. It's not ideal, but I was able to get the image working by changing the mariadb data directory to a location that isn't mapped to a volume by default. Of course it won't be persisted this way, but at least it runs... Dockerfile looks like this:
|
Why not just change $ docker run ... mariadb:X.Y --datadir /var/lib/mysql-local or FROM mariadb:X.Y
CMD ["--datadir", "/var/lib/mysql-local"] |
Perfect, thanks @tianon - I was hoping my comment might spur some alternative suggestions :) |
@tianon:
using |
@strarsis This is an informed guess (as I haven't tried it) but perhaps either:
It looks like mariadb runs under a mysql user that does not have permission to write to /var/lib. When you use the |
Original issue seems resolved so going to close |
I've tried to start this image with Docker for Windows edge (
17.11.0-ce-win40
) and enabled linux containers:But I get the following permission error:
I guess this should be easy to fix as soon as I figured out how permissions work for this image.
Does anybody has an idea what I can try to fix this problem?
The text was updated successfully, but these errors were encountered: