浏览代码

Document POSTGRES_INITDB_ARGS env var

This documents the POSTGRES_INITDB_ARGS environment variable added in #132.
Nick Cox 9 年之前
父节点
当前提交
1399d045b4
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      postgres/content.md

+ 4 - 0
postgres/content.md

@@ -53,6 +53,10 @@ This optional environment variable can be used to define another location - like
 
 
 This optional environment variable can be used to define a different name for the default database that is created when the image is first started. If it is not specified, then the value of `POSTGRES_USER` will be used.
 This optional environment variable can be used to define a different name for the default database that is created when the image is first started. If it is not specified, then the value of `POSTGRES_USER` will be used.
 
 
+### `POSTGRES_INITDB_ARGS`
+
+This optional environment variable can be used to send arguments to `postgres initdb`. The value is a space separated string of arguments as `postgres initdb` would expect them. This is useful for adding functionality like data page checksums: `-e POSTGRES_INITDB_ARGS="--data-checksums"`.
+
 # How to extend this image
 # How to extend this image
 
 
 If you would like to do additional initialization in an image derived from this one, add one or more `*.sql` or `*.sh` scripts 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 run any `*.sql` files and source any `*.sh` scripts found in that directory to do further initialization before starting the service.
 If you would like to do additional initialization in an image derived from this one, add one or more `*.sql` or `*.sh` scripts 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 run any `*.sql` files and source any `*.sh` scripts found in that directory to do further initialization before starting the service.