[Lada-commits] [PATCH 1 of 3] Set postgresql version to 9.5 in dockerfile for more jsonb support

Wald Commits scm-commit at wald.intevation.org
Wed Mar 8 09:44:21 CET 2017


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1488962474 -3600
# Node ID 902bc2190fec53b8da72da5b51f6dc5491cb4dec
# Parent  1e0ba37ff3d866e5b4d0c7f81df3304f23c8e10a
Set postgresql version to 9.5 in dockerfile for more jsonb support.

diff -r 1e0ba37ff3d8 -r 902bc2190fec db_schema/Dockerfile
--- 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"]


More information about the Lada-commits mailing list