-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Windows 10 is always FATAL: data directory "/var/lib/postgresql/data" has wrong ownership #435
Comments
I have this same issue only on Windows. Everywhere else is fine. The only way I was able to get around this was through a named volume mount:
|
Unfortunately, this is likely docker/for-win#445, and there's not really anything we can do to fix it directly in the image. You might be able to work around it by messing with |
Z uwagi na docker-library/postgres#435 postrgres dla Windows musi uzywac named volumes.
Z uwagi na docker-library/postgres#435 postrgres dla Windows musi uzywac named volumes.
Are there any updates on this issue? Here is a simple case to produce this error: Compose file:
Docker file:
I tried 1) changing the location of the data folder 2) running as root and 3) changing the ownership of the data folder. I can't use a named volume as others have suggested because I need to mount the data folder to a specific location on my server. |
I have the same issue running: I get from logs:
|
Maybe there is a way to get around this using the userns-remap on the deamon? Must the docker image be "prepared" to use that feature? |
I solved this by mapping my local volume one directory below the one Postgres needs:
|
This solution worked for me: |
I have same issue with official image on windows 10. even I set up the PGDATA to a lower level subdirectory as : |
Thank U!! I solve my problem |
Any updates on this issue? I'm trying to deploy a Postgresql Docker container in Microsoft Azure. Their YAML file doesn't have the ability to use named volumes as far as I can tell. When I'm using azureFile, which is basically a bind mount, I stumble upon this issue as well... |
it worked for me. Thank you! |
On Windows 10 Pro is always failed while docker-compose up, otherwise on mac is work perfectly.
Here are some my docker-compose file:
and there are some logs.
The text was updated successfully, but these errors were encountered: