comparison db_schema/Dockerfile @ 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 259a6b638968
children 5a62a68bccf5
comparison
equal deleted inserted replaced
1305:1e0ba37ff3d8 1306:902bc2190fec
1 # Docker file for postgresql 9.4 on debain 1 # Docker file for postgresql 9.5 on debain
2 # 2 #
3 # build with e.g. `docker build --force-rm=true -t koala/lada_db .', 3 # build with e.g. `docker build --force-rm=true -t koala/lada_db .',
4 # then run with e.g. 4 # then run with e.g.
5 # `docker run --name lada_db -dp 2345:5432 koala/lada_db:latest' 5 # `docker run --name lada_db -dp 2345:5432 koala/lada_db:latest'
6 # 6 #
26 26
27 # 27 #
28 # Install packages 28 # Install packages
29 # 29 #
30 RUN apt-get update && \ 30 RUN apt-get update && \
31 apt-get install -y postgresql-9.4-postgis-2.1 postgis curl unzip 31 apt-get install -y curl unzip make gcc
32 RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" \
33 >> /etc/apt/sources.list
34 RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
35 RUN apt-get update && \
36 apt-get install -y --no-install-recommends \
37 postgresql-9.5-postgis-2.3 postgresql-9.5-postgis-scripts postgis
32 38
33 # 39 #
34 # Use user postgres to run the next commands 40 # Use user postgres to run the next commands
35 # 41 #
36 USER postgres 42 USER postgres
41 # 47 #
42 # Adjust PostgreSQL configuration so that remote connections to the 48 # Adjust PostgreSQL configuration so that remote connections to the
43 # database are possible. 49 # database are possible.
44 # 50 #
45 RUN echo "host all all 0.0.0.0/0 md5" >> \ 51 RUN echo "host all all 0.0.0.0/0 md5" >> \
46 /etc/postgresql/9.4/main/pg_hba.conf 52 /etc/postgresql/9.5/main/pg_hba.conf
47 53
48 RUN echo "listen_addresses='*'" >> /etc/postgresql/9.4/main/postgresql.conf 54 RUN echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf
49 55
50 # 56 #
51 # Expose the PostgreSQL port 57 # Expose the PostgreSQL port
52 # 58 #
53 EXPOSE 5432 59 EXPOSE 5432
60 # It's because of the -w 66 # It's because of the -w
61 # 67 #
62 ADD . /opt/lada_sql/ 68 ADD . /opt/lada_sql/
63 WORKDIR /opt/lada_sql/ 69 WORKDIR /opt/lada_sql/
64 70
65 RUN /usr/lib/postgresql/9.4/bin/pg_ctl start -wD /etc/postgresql/9.4/main/ && \ 71 RUN /usr/lib/postgresql/9.5/bin/pg_ctl start -wD /etc/postgresql/9.5/main/ && \
66 /opt/lada_sql/setup-db.sh 72 /opt/lada_sql/setup-db.sh
67 73
68 # 74 #
69 # Set the default command to run when starting the container 75 # Set the default command to run when starting the container
70 # 76 #
71 CMD ["/usr/lib/postgresql/9.4/bin/postgres", "-D", \ 77 CMD ["/usr/lib/postgresql/9.5/bin/postgres", "-D", \
72 "/var/lib/postgresql/9.4/main", "-c", \ 78 "/var/lib/postgresql/9.5/main", "-c", \
73 "config_file=/etc/postgresql/9.4/main/postgresql.conf"] 79 "config_file=/etc/postgresql/9.5/main/postgresql.conf"]
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)