Skip to content

ERROR: required extension "postgis" is not installed #2

Closed
@Starefossen

Description

@Starefossen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions