diff --git a/map/Dockerfile b/map/Dockerfile index c4171a98..8a40c52c 100755 --- a/map/Dockerfile +++ b/map/Dockerfile @@ -11,12 +11,14 @@ # language governing permissions and limitations under the License. # -FROM ubuntu:14.04 +FROM ubuntu:18.04 MAINTAINER sebastian.mattheis@bmw-carit.de ADD /pgsql/ /opt/pgsql/ -RUN apt-get update && apt-get -y install patch postgresql-9.3-postgis-2.1 git openjdk-7-jdk python-psycopg2 python-numpy python-gdal -RUN patch /etc/postgresql/9.3/main/postgresql.conf < /opt/pgsql/postgresql.conf.patch && patch /etc/postgresql/9.3/main/pg_hba.conf < /opt/pgsql/pg_hba.conf.patch && echo "export HOME=/root" >> /root/.bashrc -RUN cd /opt/ && git clone https://github.com/openstreetmap/osmosis.git && cd osmosis && git checkout tags/0.43.1 && ./gradlew assemble && echo "export PATH=${PATH}:/opt/osmosis/package/bin" >> /root/.bashrc +ADD setup_tz.sh /usr/bin/setup_tz.sh +RUN /usr/bin/setup_tz.sh +RUN apt-get -y install sudo patch postgresql-10-postgis-2.4 git openjdk-8-jdk-headless python-psycopg2 python-numpy python-gdal +RUN patch /etc/postgresql/10/main/postgresql.conf < /opt/pgsql/postgresql.conf.patch && patch /etc/postgresql/10/main/pg_hba.conf < /opt/pgsql/pg_hba.conf.patch && echo "export HOME=/root" >> /root/.bashrc +RUN cd /opt/ && git clone https://github.com/openstreetmap/osmosis.git && cd osmosis && git checkout tags/0.47 && ./gradlew assemble && echo "export PATH=${PATH}:/opt/osmosis/package/bin" >> /root/.bashrc CMD service postgresql start && /bin/bash --rcfile /root/.bashrc diff --git a/map/pgsql/pg_hba.conf.patch b/map/pgsql/pg_hba.conf.patch old mode 100755 new mode 100644 index c00422d7..c21b8377 --- a/map/pgsql/pg_hba.conf.patch +++ b/map/pgsql/pg_hba.conf.patch @@ -1,8 +1,7 @@ ---- /etc/postgresql/9.3/main/pg_hba.conf.original 2014-10-25 19:55:37.469260394 +0000 -+++ /etc/postgresql/9.3/main/pg_hba.conf 2014-10-25 20:13:38.676594184 +0000 +--- pg_hba.conf 2020-02-25 13:41:54.406030860 -0500 ++++ pg_hba.conf.edited 2020-02-25 14:12:28.157052052 -0500 @@ -97,3 +97,4 @@ - #local replication postgres peer - #host replication postgres 127.0.0.1/32 md5 - #host replication postgres ::1/128 md5 -+host all all samenet md5 - + local replication all peer + host replication all 127.0.0.1/32 md5 + host replication all ::1/128 md5 ++host all all 0.0.0.0/0 md5 diff --git a/map/setup_tz.sh b/map/setup_tz.sh new file mode 100755 index 00000000..3539fe10 --- /dev/null +++ b/map/setup_tz.sh @@ -0,0 +1,7 @@ +# set noninteractive installation +export DEBIAN_FRONTEND=noninteractive +#install tzdata package +apt-get update && apt-get install -y tzdata +# set your timezone +ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime +dpkg-reconfigure --frontend noninteractive tzdata