Allow "initdb.d" scripts to be executed instead of sourced#452
Allow "initdb.d" scripts to be executed instead of sourced#452yosifkit merged 1 commit intodocker-library:masterfrom
Conversation
|
@tianon Well… given an executable #!/bin/sh -e
gunzip < /something | pg_restoreMy expectation was that this would run in its own shell with My workaround was to move this script to #!/bin/sh -e
/docker-entrypoint-initdb.d/restore.sh.realThis runs my script in a separate shell, as expected, allowing the entrypoint script to change however it wants without affecting my restore script's operation. I'd rather it work that way out of the box, of course. Compatibility is important, so I don't think the |
|
Fair point, seems like a sane compromise. PR updated. (One caveat is that this will mean any files bind-mounted from Windows will be executed instead of sourced.) |
|
This seems sane and I am working to update the docs. Do we want to add the same functionality to MariaDB, MySQL, and Percona? They have had |
|
Sure, seems sane.
|
yosifkit
left a comment
There was a problem hiding this comment.
LGTM, docs PR created: docker-library/docs#1247
- `drupal`: 8.5.4 - `ghost`: 1.24.1 - `golang`: 1.10.3, 1.9.7 - `mongo`: 4.0.0~rc4 - `owncloud`: add `unzip` (docker-library/owncloud#103) - `postgres`: allow `initdb.d` scripts to be executed instead of sourced (docker-library/postgres#452) - `tomcat`: remove jre9 (docker-library/tomcat#120)
Closes #450
cc @willglynn (is this similar to the workaround you've applied in your own scripts?)