1
0
mirror of https://github.com/docker-library/postgres.git synced 2025-11-17 13:02:40 +03:00
Commit Graph

35 Commits

Author SHA1 Message Date
Tianon Gravi
36ffea2cb2 Adjust "chmod" to not fail (since PostgreSQL validates this itself later) 2020-12-28 09:51:28 -08:00
xpetit
fdf884a12f Fix typo 2020-09-06 18:17:09 +02:00
Tianon Gravi
33bccfcadd Fix silently skipped init scripts 2020-02-28 16:01:52 -08:00
Joe Ferguson
4f70bf2b81 Add .sql.xz support to docker-entrypoint-initdb.d
xzcat is provided by busybox in alpine
2020-02-17 15:38:43 -08:00
Tianon Gravi
f1bc8782e7 Clarify that "POSTGRES_PASSWORD" should be non-empty
(Assuming "POSTGRES_HOST_AUTH_METHOD" is not set to the "trust" value which does not require passwords.)
2020-02-17 12:56:07 -08:00
Joe Ferguson
46161d6ab3 Add missing -n's to bash test 2020-01-09 16:19:13 -08:00
Joe Ferguson
42ce7437ee Error when POSTGRES_PASSWORD is unset like mysql
Add POSTGRES_HOST_AUTH_METHOD to bring back old behavior and be similar to MYSQL_ALLOW_EMPTY_PASSWORD, but add warning when "trust" is used since it disables all passwords
2020-01-09 16:19:02 -08:00
Tianon Gravi
0d0485cb02 Merge pull request #647 from infosiftr/help
Check for "help" to short circuit server starting (since they break when passed to pg_ctl)
2019-12-03 09:43:18 -08:00
Joe Ferguson
de2aa0bf56 Check for "help" to short circuit server starting (since they break when passed to pg_ctl) 2019-12-02 19:05:53 -08:00
Tianon Gravi
89a2fb84e6 Update temporary server to prefer PGPORT if set (since the client and server both normally respect that variable) 2019-12-02 18:07:23 -08:00
Tianon Gravi
34df4665bf Apply update.sh 2019-11-26 15:54:46 -08:00
Tianon Gravi
820323fa89 Adjust "docker_temp_server_start" to override port for consistent unix socket path 2019-11-25 17:15:02 -08:00
Joe Ferguson
8fada98158 Fixes from tianon's review 2019-11-12 16:00:40 -08:00
Joe Ferguson
7c84645f2d Apply update.sh for new entrypoint 2019-10-11 13:18:19 -07:00
Tianon Gravi
45b855af13 Warn on POSTGRES_PASSWORD of 100+ characters 2019-01-08 16:48:03 -08:00
Tianon Gravi
3f585c58df Utilize "initdb" functionality better to allow "POSTGRES_INITDB_ARGS=--auth-local=md5"
This also closes a slight bug we've had previously where the "postgres" user is _always_ created (now we only create the user specified via the environment variables).
2018-09-06 13:49:43 -07:00
Tianon Gravi
36294f464a Update psql invocations to properly escape user input!
See also:

- https://stackoverflow.com/a/18683163/433558
- https://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-VARIABLES
- https://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-INTERPOLATION
2018-08-24 11:22:17 -07:00
Tianon Gravi
eff90effc6 Allow "initdb.d" scripts to be executed instead of sourced 2018-05-30 11:00:02 -07:00
Tianon Gravi
fe89a60c9b Implement "nss_wrapper" for Debian variants 2018-05-24 11:39:50 -07:00
Codruț Constantin Gușoi
6fe8c15843 Listen only on the unix socket during init
Healthchecks that used `pg_isready -p 5432` were incorrectly flagging
the container as being healthy during initialization phase since
healthchecks are being run inside the container itself, so
`listen_addresses='localhost'` was not enough. Setting
`listen_addresses=''` forces the server to only listen on the unix
socket so no ports are open that might incorrectly interfeer with the
healthchecks.
2018-05-04 10:38:07 +01:00
Tianon Gravi
2f0f505894 Apply update.sh 2017-07-27 16:54:40 -07:00
Tianon Gravi
54053ad27a Adjust "/var/run/postgresql" permissions for arbitrary-user support 2017-05-19 10:46:58 -07:00
Tianon Gravi
bc44222ff8 Add explicit "--build" to our "./configure" invocations 2017-05-10 10:19:28 -07:00
Pahaz Blinov
3d4e5e9f64 Simplify docker-entrypoint.sh append line 2017-04-06 14:32:45 -07:00
Tianon Gravi
913bc48bfd Update order to match other blocks and move "--xlogdir" handling down to where it'll be invoked regardless of our "root" status 2017-03-20 09:54:06 -07:00
Daniel Dent
89530f6020 POSTGRES_INITDB_XLOGDIR to specify xlog log dir
Adds support for the POSTGRES_INITDB_XLOGDIR environment variable, which specifies where the postgres transaction log is stored.

For some use cases, being able to place the transaction log on a different volume is useful.

Existing support for providing flags via $POSTGRES_INITDB_ARGS is inadequate because of the need to create and chown/chmod the directory prior to running initdb.
2017-02-28 14:05:26 -08:00
Tianon Gravi
d7accc9c8c Add one more minor tweak on top of #253 2017-01-19 16:04:43 -08:00
Tianon Gravi
3706d4c456 Allow arbitrary --user values (mostly)
One special case is that `initdb` _requires_ the current user to exist in `/etc/passwd`, but running PostgreSQL itself does not require that.
2017-01-19 14:59:34 -08:00
Tianon Gravi
b68154ed79 Use "/var/run/postgresql" consistently (and apply Debian's change of the default socket path to Alpine also) 2017-01-19 14:24:15 -08:00
Joe Ferguson
4f3238cf60 Run update.sh 2016-12-12 10:42:05 -08:00
Tianon Gravi
5e7d985129 Apply change to all variants via update.sh 2016-12-06 12:55:40 -08:00
Tianon Gravi
edd455e5b1 Add "file_env" support, especially for Docker secrets
This adds explicit support for the following:

- `POSTGRES_DB_FILE`
- `POSTGRES_INITDB_ARGS_FILE`
- `POSTGRES_PASSWORD_FILE`
- `POSTGRES_USER_FILE`
2016-11-21 13:44:36 -08:00
Joe Ferguson
2a95274301 Use gosu postgres when writing to hba.cnf so that drop-cap dac_override works 2016-10-25 15:35:16 -07:00
sixcorners
e2f07374b3 Add "mkdir -p /run/postgresql" to docker-entrypoint.sh.
This allows the container to run with a tmpfs /run.
2016-10-20 00:06:16 -05:00
Tianon Gravi
0f910e3495 Add 9.6~beta1-1.pgdg80+1 2016-05-12 14:01:41 -07:00