Closed daweimau closed 11 months ago
Thank you for reporting this issue!
To better assist you, could you provide more details about:
By the way, what exact filesystem do you have under the volume? ( ./pgdata:
)
For instance, postgres doesn't work for others under Mac/VirtioFS either.
Please try using "docker volume" as a workaround. It has solved the problem for many.
Please also check the related issues in the
If we replace image with postgres:alpine, we have no issues. Everything works.
Please also replace the data dir ( ./pgdatapostgres01:
vs. ./pgdatapostgis02:
) and check the logs for the initialization process.
Please share both logs so we can check.
I don't understand the details. But I believe the initdb-postgis.sh script is doing it
There are two initialization steps, which can be challenging to debug. Please share your initialization logs with us.
Or you can replace/remove the postgis initialization with a dummy script, so the original 10_postgis.sh
is not running.
-v $(pwd)/10_postgis.sh:/docker-entrypoint-initdb.d/10_postgis.sh
os
Mac M1 pro sillicon
macOS Ventura 13.5.1
Docker 4.11.0
Thanks for your links. Reading them made me more suspicious of my workaround. I've since confirmed:
The behaviour can be quite intermittent so I will come back if my observation changes; I will continue with 4.23+VFS
The behaviour can be quite intermittent so I will come back if my observation changes; I will continue with 4.23+VFS
I am closing this issue. However, if there is any important matter that was overlooked, please let me know and I will reopen the issue.
Given the below docker-compose yml:
image
withpostgres:alpine
, we have no issues. Everything works.postgis/postgis:15-3.4-alpine
, building the image seems ok, and first run also seems ok. Subsequent runs withdocker compose up db
will produce this error:But it works with the postgres alpine image. Why should it not work now?
Seeing as we extend the postgres-alpine image, and postgres-alpine works, I figured we must be introducing the problem after the base image layers / entrypoint.
data directory "/var/lib/postgresql/data" has wrong ownership
Since doing so, the
data directory "/var/lib/postgresql/data" has wrong ownership
error has disappeared.I don't understand the details. But I believe the
initdb-postgis.sh
script is doing it