Closed
Description
Hello!
I've been trying to migrate from MySQL to PostgreSQL. The database I'm working with is quite large and I need to keep the data folder in my external SSD.
On my own laptop's drive, I can run this no problem:
docker run --rm -e POSTGRES_PASSWORD=password -v `pwd`:/var/lib/postgresql/data -p 5432:5432 postgres
It initializes the folders in the current working dir and logs out database system is ready to accept connections
.
But when cwd
is /Volume/ExternalSSD/something/something
, it bails out, logging:
running bootstrap script ... 2020-05-08 01:53:31.550 UTC [82] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2020-05-08 01:53:31.550 UTC [82] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
I tried --user "$(id -u):$(id -g)"
, didn't help. I also tried initializing the db on my local and then mv
them to my external ssd, that didn't work either.
Docker volumes are not really an option here since I want the data volume to be on my external ssd.
Any help on how I can solve this would be greatly appreciated.
docker -v
Docker version 19.03.8, build afacb8b