From c4b32a680cb1b36aed87cb119ab392ff69137070 Mon Sep 17 00:00:00 2001 From: Seth Robertson Date: Fri, 22 May 2015 16:02:00 -0400 Subject: [PATCH] Single user mode doesn't work for many commands You cannot have multiline commands, table creates do not seem to always work, etc. --- postgres/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/content.md b/postgres/content.md index 60e015d33534..d4ddff7fdda9 100644 --- a/postgres/content.md +++ b/postgres/content.md @@ -41,7 +41,7 @@ This optional environment variable is used in conjunction with `POSTGRES_PASSWOR # How to extend this image -If you would like to do additional initialization in an image derived from this one, add a `*.sh` script under `/docker-entrypoint-initdb.d` (creating the directory if necessary). After the entrypoint calls `initdb` to create the default `postgres` user and database, it will source any `*.sh` script found in that directory to do further initialization before starting the service. If you need to execute SQL commands as part of your initialization, the use of Postgres'' [single user mode](http://www.postgresql.org/docs/9.3/static/app-postgres.html#AEN90580) is highly recommended. +If you would like to do additional initialization in an image derived from this one, add a `*.sh` script under `/docker-entrypoint-initdb.d` (creating the directory if necessary). After the entrypoint calls `initdb` to create the default `postgres` user and database, it will source any `*.sh` script found in that directory to do further initialization before starting the service. If you need to execute privledged SQL commands as part of your initialization, the use of Postgres'' [single user mode](http://www.postgresql.org/docs/9.3/static/app-postgres.html#AEN90580) is highly recommended. However, complex sql commands, including table creation, should be done more [normally](http://stackoverflow.com/questions/28244869/creating-a-table-in-single-user-mode-in-postgres). You can also extend the image with a simple `Dockerfile` to set the locale. The folowing example will set the default locale to `de_DE.utf8`: