diff --git a/Dockerfile b/Dockerfile index 36aaa1c..4e8866d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,19 @@ -FROM ubuntu:12.04 +FROM ubuntu:14.04 MAINTAINER Helmi -RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list +RUN echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" > /etc/apt/sources.list RUN apt-get -y update RUN apt-get -y install ca-certificates RUN apt-get -y install wget RUN wget --quiet --no-check-certificate -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - -RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list +RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" >> /etc/apt/sources.list RUN apt-get -y update RUN apt-get -y upgrade -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 apt-get -y install postgresql-9.4 postgresql-contrib-9.4 postgresql-9.4-postgis-2.1 postgis +RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.4/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 echo "listen_addresses = '*'" >> /etc/postgresql/9.3/main/postgresql.conf -RUN echo "port = 5432" >> /etc/postgresql/9.3/main/postgresql.conf +RUN echo "listen_addresses = '*'" >> /etc/postgresql/9.4/main/postgresql.conf +RUN echo "port = 5432" >> /etc/postgresql/9.4/main/postgresql.conf EXPOSE 5432 diff --git a/start.sh b/start.sh index 9635195..ceb9b29 100644 --- a/start.sh +++ b/start.sh @@ -1,9 +1,9 @@ #!/bin/bash -DATADIR="/var/lib/postgresql/9.3/main" -CONF="/etc/postgresql/9.3/main/postgresql.conf" -POSTGRES="/usr/lib/postgresql/9.3/bin/postgres" -INITDB="/usr/lib/postgresql/9.3/bin/initdb" +DATADIR="/var/lib/postgresql/9.4/main" +CONF="/etc/postgresql/9.4/main/postgresql.conf" +POSTGRES="/usr/lib/postgresql/9.4/bin/postgres" +INITDB="/usr/lib/postgresql/9.4/bin/initdb" # test if DATADIR is existent if [ ! -d $DATADIR ]; then