Closed
Description
I'm having trouble writing a script to /docker-entrypoint-initdb.d/ and having Docker run it from /docker-entrypoint.sh.
- It looks like /docker-entrypoint.sh is supposed to source any scripts it finds in /docker-entrypoint-initdb.d/. I verified I'm running this version of the script by
cat
ing the script and verifying this is the expected behavior. - I followed the instructions in "justfalter"'s comment here: https://registry.hub.docker.com/_/postgres/ to add a fix-acl.sh file and put it in the correct folder. I double checked the folder name was correct.
- I also mirrored the commands in the /docker-entrypoint.sh script to check that the script could be sourced and would produce the desired behavior.
- When I do "docker run", it's clear that Postgres starts but the specified line was not added to
pg_hba.conf
. I double checked this by verifying the mtime ofpg_hba.conf
- it wasn't touched or overwritten after my script ran. I also tried having my scripttouch
various files to just verify that it ran, with no success.
I'm at a loss for how to continue debugging this; I placed a file in the place that it's supposed to go, verified that the script runner that starts postgres should run it, and verified that the script does what I want, and I don't see any output (a changed pg_hba.conf, or even a simple file).
I'm running the newest version of everything; starting Docker inside of a Ubuntu Virtualbox being provisioned from Vagrant. I share one folder from the Docker container to the host VM - the data folder containing pg_hba.conf.
Would appreciate your help!
Kevin
Metadata
Metadata
Assignees
Labels
No labels