From 405d4d5b786d6c35784f177a303781a92ab29cc5 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 20 Apr 2018 12:50:28 -0700 Subject: [PATCH] Add a blurb about installing PostgreSQL extensions --- postgres/content.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/postgres/content.md b/postgres/content.md index 22c0105b2..9b4014c42 100644 --- a/postgres/content.md +++ b/postgres/content.md @@ -187,6 +187,12 @@ There are many ways to set PostgreSQL server configuration. For information on w $ docker run -d --name some-postgres %%IMAGE%% -c 'shared_buffers=256MB' -c 'max_connections=200' ``` +## Additional Extensions + +When using the default (Debian-based) variants, installing additional extensions (such as PostGIS) should be as simple as installing the relevant packages (see [github.com/appropriate/docker-postgis](https://github.com/appropriate/docker-postgis/blob/f6d28e4a1871b1f72e1c893ff103f10b6d7cb6e1/10-2.4/Dockerfile) for a concrete example). + +When using the Alpine variants, any postgres extension not listed in [postgres-contrib](https://www.postgresql.org/docs/10/static/contrib.html) will need to be compiled in your own image (again, see [github.com/appropriate/docker-postgis](https://github.com/appropriate/docker-postgis/blob/f6d28e4a1871b1f72e1c893ff103f10b6d7cb6e1/10-2.4/alpine/Dockerfile) for a concrete example). + # Caveats If there is no database when `postgres` starts in a container, then `postgres` will create the default database for you. While this is the expected behavior of `postgres`, this means that it will not accept incoming connections during that time. This may cause issues when using automation tools, such as `docker-compose`, that start several containers simultaneously.