This gist is an example of how you can simply install and run and extended Postgres using docker-compose. It assumes that you have docker and docker-compose installed and running on your workstation.
- Requires
dockeranddocker-compose - Clone via http:
git clone https://gist.github.com/b0b7e06943bd389560184d948bdc2d5b.git - Make
load-extensions.shexecutable - Build the image:
docker-compose build
See docker-compose.yml for details.
How would you install an extension that has system wide dependancies that need compilnig?
e.g.
The whole process consists of downloading the source to the extension folder inside the docker Postgres installation (container shell), compiling the extension (container shell), and installing it (sql).
The extension files must be placed in the extension subdirectory of the PostgreSQL shared files directory, which can be found with
pg_config --sharedirIf the extension building infrastructure PGXS is installed, you can do that simply with
make installThe extension is installed in the database to which you want to migrate the data with the SQL command
CREATE EXTENSION db_migrator;