changeset 1306:902bc2190fec

Set postgresql version to 9.5 in dockerfile for more jsonb support.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 08 Mar 2017 09:41:14 +0100
parents 1e0ba37ff3d8
children c2df9c848e9d
files db_schema/Dockerfile
diffstat 1 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/db_schema/Dockerfile	Tue Feb 28 14:56:14 2017 +0100
+++ b/db_schema/Dockerfile	Wed Mar 08 09:41:14 2017 +0100
@@ -1,4 +1,4 @@
-# Docker file for postgresql 9.4 on debain
+# Docker file for postgresql 9.5 on debain
 #
 # build with e.g. `docker build --force-rm=true -t koala/lada_db .',
 # then run with e.g.
@@ -28,7 +28,13 @@
 # Install packages
 #
 RUN apt-get update && \
-    apt-get install -y postgresql-9.4-postgis-2.1 postgis curl unzip
+    apt-get install -y curl unzip make gcc
+RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" \
+    >> /etc/apt/sources.list
+RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
+RUN apt-get update && \
+    apt-get install -y --no-install-recommends \
+            postgresql-9.5-postgis-2.3 postgresql-9.5-postgis-scripts postgis
 
 #
 # Use user postgres to run the next commands
@@ -43,9 +49,9 @@
 # database are possible.
 #
 RUN echo "host all  all    0.0.0.0/0  md5" >> \
-    /etc/postgresql/9.4/main/pg_hba.conf
+    /etc/postgresql/9.5/main/pg_hba.conf
 
-RUN echo "listen_addresses='*'" >> /etc/postgresql/9.4/main/postgresql.conf
+RUN echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf
 
 #
 # Expose the PostgreSQL port
@@ -62,12 +68,12 @@
 ADD . /opt/lada_sql/
 WORKDIR /opt/lada_sql/
 
-RUN /usr/lib/postgresql/9.4/bin/pg_ctl start -wD /etc/postgresql/9.4/main/ && \
+RUN /usr/lib/postgresql/9.5/bin/pg_ctl start -wD /etc/postgresql/9.5/main/ && \
     /opt/lada_sql/setup-db.sh
 
 #
 # Set the default command to run when starting the container
 #
-CMD ["/usr/lib/postgresql/9.4/bin/postgres", "-D", \
-     "/var/lib/postgresql/9.4/main", "-c", \
-     "config_file=/etc/postgresql/9.4/main/postgresql.conf"]
+CMD ["/usr/lib/postgresql/9.5/bin/postgres", "-D", \
+     "/var/lib/postgresql/9.5/main", "-c", \
+     "config_file=/etc/postgresql/9.5/main/postgresql.conf"]
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)