launched a postgres db within docker container and want to install extensions afterwards with following script:
su postgres sh -c "psql -U postgres <<EOSQL
CREATE EXTENSION hstore;
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
CREATE EXTENSION fuzzystrmatch;
EOSQL"
trap "echo \"Sending SIGTERM to postgres\"; killall -s SIGTERM postgres" SIGTERM
su postgres sh -c "$POSTGRES -D $DATADIR -c config_file=$CONF" &
wait $!
but it does nothing, in the extension list only one default plpgsql is installed.
but if I enter container with
docker exec -it osm-database bash
and run the following in cli in sequence
su postgres
psql -U postgres
create extension hstore;
then I can see from pgAdmin hstore is successfully installed