Replies: 1 comment
-
postgres: invalid option -- 'v'This looks like your command to start the container might've had a typo? Is it possible the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Experiencing permission issues when deploying a PostgreSQL 9.6 container in Docker Swarm that uses an NFS-mounted volume for data storage. The container fails to start with the error:
FATAL: data directory "/var/lib/postgresql/data/pg_data" has wrong ownership HINT: The server must be started by the user that owns the data directory.Environment Details
Platform: Docker Swarm
PostgreSQL Version: 9.6.24
NFS Server: re0srt10003.eresz03.com
NFS Mount: /vol/re0srt10003_vol011/NFS_customer_data_02/Production_data/nfs01/
Note:
→ only AD valid users (unix/windows) can be used to access a file share
→ local users access is not permitted (users that only exists on the local linux system)
→ Please be aware of that new file shares will be on new Server re0srt10003.eresz03.com and as mentioned in our docupedia page local users (Example UID 1000 / GID 1000) are not working. No exceptions possible! Please use your Domain Users and Groups (UID 188044 / GID 806642981) to connect to the share.
Dockerfile used to create image with custom user and group
What I've Tried
Modified the Dockerfile to change postgres user UID/GID to match domain requirements
Verified the user mapping inside the container shows correct IDs id postgres uid=188044(postgres) gid=806642981(postgres) groups=806642981(postgres),101(ssl-cert)
Confirmed NFS mount is accessible by ownership shows as below, drwx--S--- 8 188044 806642981 db
Tried to run the service without NFS volume - working as expected.
Tried to run a postgres container with from the NFS-path: /vol/re0srt10003_vol011/NFS_customer_data_02/Production_data/nfs01/
docker run -d --name postgresCont_02 --user 188044:806642981 -e POSTGRES_PASSWORD=<pw> -v "$(pwd)":/var/lib/postgresql/data -p 5436:5432 postgres:16.10docker logs -f 17arte345198k
Additional Context
This setup worked previously with local user/root user, but fails when migrating to the new NFS-based storage system that enforces domain users.
Any suggestions regarding the possible root causes or alternative ways to address this issue would be highly appreciated!.
Beta Was this translation helpful? Give feedback.
All reactions