Skip to content

Instantly share code, notes, and snippets.

@md5
Last active August 29, 2015 14:14
Show Gist options
  • Save md5/c0de85617891e1c17fcd to your computer and use it in GitHub Desktop.
Save md5/c0de85617891e1c17fcd to your computer and use it in GitHub Desktop.
Dockerfile for derived postgis image
FROM mdillon/postgis:9.3
# Add init script
ADD initdb-foo.sh /docker-entrypoint-initdb.d/xxx_postgis_foo.sh
# Add locale
RUN localedef -i nb_NO -c -f UTF-8 -A /usr/share/locale/locale.alias nb_NO.UTF-8
ENV LANG nb_NO.utf8
#!/bin/sh
POSTGRES="gosu postgres postgres"
$POSTGRES --single -E <<EOSQL
CREATE DATABASE foo template template_postgis lc_collate 'nb_NO.utf8' lc_ctype 'nb_NO.utf8';
EOSQL
#$POSTGRES --single foo -E <<EOSQL
#CREATE EXTENSION postgis;
#CREATE EXTENSION postgis_topology;
#EOSQL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment