Replies: 1 comment
-
What would happen if you manage to change the image from root to postgres to another user. If you constantly using the same user the check is very fast, it will only slow down when the check is going to chown |
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
-
In first wakeup from "docker-compose up -d", the system arrives at setup-database.sh and approx. in line 77 in the script it calls the function "non_root_permissions postgres postgres".
This function looks like this:
basically, it calls directory_checker function which checks if the directory has the postgres:postgres owner/group pair, and it not - it uses chown with -R flag to set the ownerships of the directory recoursively.
it does so for small directories like "/scripts", but also for very large directories like "/usr/lib/postgresql/ ", "/var/lib/" and "/usr/bin/"...
my question is why don't chown these directories upon image creation ? this will leave directory_checker with much less work when waking up from "docker-compose up -d"
Thanks !
Yoni
Beta Was this translation helpful? Give feedback.
All reactions