diff --git a/Dockerfile b/Dockerfile index 47a6dc9..4fb091a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ ENV LC_ALL en_US.UTF-8 RUN update-locale LANG=en_US.UTF-8 RUN apt-get -y install postgresql-9.3 postgresql-contrib-9.3 postgresql-9.3-postgis-2.1 postgis RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf -RUN service postgresql start && /bin/su postgres -c "createuser -d -s -r -l docker" && /bin/su postgres -c "psql postgres -c \"ALTER USER docker WITH ENCRYPTED PASSWORD 'docker'\"" && service postgresql stop +RUN service postgresql start && /bin/su postgres -c "createuser -d -s -r -l docker" && /bin/su postgres -c "psql postgres -c \"ALTER USER docker WITH ENCRYPTED PASSWORD 'docker'\"" && /bin/su postgres -c "psql postgres -c \"create extension postgis\"" && service postgresql stop RUN echo "listen_addresses = '*'" >> /etc/postgresql/9.3/main/postgresql.conf RUN echo "port = 5432" >> /etc/postgresql/9.3/main/postgresql.conf diff --git a/README.md b/README.md index cd4e2e0..1784b55 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This Dockerfile creates a container running PostGIS 2.1 in PostgreSQL 9.3 - expose port `5432` - initializes a database in `/var/lib/postgresql/9.3/main` - superuser in the database: `docker/docker` - +- comes with postgis extension installed ## Install