Skip to content

Conversation

md5
Copy link
Contributor

@md5 md5 commented Aug 22, 2015

This PR changes the entrypoint to run any /docker-entrypoint-initdb.d/*.sql scripts as $POSTGRES_USER. Previously, the scripts were always run as postgres (which is the default for $POSTGRES_USER, so nothing changes in the default case).

Since $POSTGRES_USER is given SUPERUSER privileges in the entrypoint, that user should be able to do anything postgres can do. I tested having it create a database and a role, both of which worked despite the fact that CREATEDB and CREATEROLE are not granted explicitly.

Fixes #81

@yosifkit
Copy link
Member

LGTM

@yosifkit
Copy link
Member

(If you do a rebase, we should get a build test) 🤘

@md5
Copy link
Contributor Author

md5 commented Aug 25, 2015

Rebased. The build is running now.

@tianon
Copy link
Member

tianon commented Aug 25, 2015

LGTM 👍

Thanks! 😄

tianon added a commit that referenced this pull request Aug 25, 2015
Run /docker-entrypoint-initdb.d/*.sql scripts as $POSTGRES_USER
@tianon tianon merged commit 118e25a into docker-library:master Aug 25, 2015
tianon added a commit to infosiftr/stackbrew that referenced this pull request Aug 25, 2015
@md5 md5 deleted the initdb-sql-as-POSTGRES_USER branch August 25, 2015 17:05
md5 added a commit to postgis/docker-postgis that referenced this pull request Aug 26, 2015
md5 added a commit to postgis/docker-postgis that referenced this pull request Sep 5, 2015
RichardScothern pushed a commit to RichardScothern/official-images that referenced this pull request Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants