owner for /var/lib/postgresql and /var/lib/postgresql/18/docker #1396
Closed
felixzhangfb
started this conversation in
General
Replies: 1 comment 8 replies
-
In PG 18+ the volume became postgres/Dockerfile-alpine.template Line 224 in ec0cb67 It's recommended to use that. |
Beta Was this translation helpful? Give feedback.
8 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.
-
I'm using postgres:18-alpine, I see docker-entrypoint.sh has below function:
So I get a folder structure like below:
I'm not an expert but it seems not reasonable, the parent folder
/var/lib/postgresqlis owned bypostgresbut the child foldervar/lib/postgresql/18is owned byroot.Why I see this as an issue because when I use docker compose, I set volumes as below:
but due to there is a specified volume
{"/var/lib/postgresql":{}}perdocker inspect postgres:18-alpine --format="{{json .Config.Volumes}}", I can see an additional anonymous volume in my docker volumes which seems annoying and dirtyCould you please advice if this is intended? Is there any best practice to get around this? Or it is something can be optimized later? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions