Closed
Description
Host OS: Ubuntu 14.04
Docker version: 1.3.3
Dockerfile:
FROM mdillon/postgis:9.3
# Add init script
ADD initdb-foo.sh /docker-entrypoint-initdb.d/foo.sh
# Add locale
RUN echo "nb_NO.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen
initdb-foo.sh:
#!/bin/sh
POSTGRES="gosu postgres postgres"
$POSTGRES --single -E <<EOSQL
CREATE DATABASE foo template template0 lc_collate 'nb_NO.UTF-8' lc_ctype 'nb_NO.UTF-8';
EOSQL
$POSTGRES --single foo -E <<EOSQL
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
EOSQL
I get the following output when I run my Dockerfile:
PostgreSQL stand-alone backend 9.3.5
backend> statement: CREATE DATABASE foo template template0 lc_collate 'nb_NO.UTF-8' lc_ctype 'nb_NO.UTF-8';
backend>
PostgreSQL stand-alone backend 9.3.5
backend> statement: CREATE EXTENSION postgis;
ERROR: type addbandarg[] does not exist
STATEMENT: CREATE EXTENSION postgis;
backend> statement: CREATE EXTENSION postgis_topology;
ERROR: required extension "postgis" is not installed
STATEMENT: CREATE EXTENSION postgis_topology;
backend> LOG: database system was shut down at 2015-01-16 14:10:49 UTC