view docker/Dockerfile.geoserv @ 4449:ce884af9f42f

Fix forecast accuracy values and improve performance Forecast accuracy should be based only on the most recent predictions. Generally consider measurements and predictions older than 14 days as outdated and irrelevant. This also implies a performance gain, since it saves a full scan of gauge_measurements and the extra index for this purpose. Adding an extra subquery level for calculation of the forecast accuracy per row instead of the function call as a FROM item saves a (nested loop) join, which is another performance gain.
author Tom Gottfried <tom@intevation.de>
date Fri, 20 Sep 2019 13:22:45 +0200
parents a524e7d7e75f
children a63df1ac39ac
line wrap: on
line source

FROM ubuntu:bionic
LABEL authors="tom@intevation.de"
LABEL description="Contains software from gemma, for right holders and\
 licensing infos, see https://hg.intevation.de/gemma ."

RUN sed -i 's/\(deb.*\)$/\1 universe/' /etc/apt/sources.list

RUN apt-get update &&\
    apt-get -y install --no-install-recommends \
    curl unzip openjdk-8-jre-headless tomcat8

ENV CATALINA_HOME /usr/share/tomcat8
ENV CATALINA_BASE /var/lib/tomcat8
ENV CATALINA_TMPDIR /tmp/tomcat8-tmp

ENV GS_URL https://downloads.sourceforge.net/project/geoserver/GeoServer

ENV GS_VERSION 2.15.2
ENV GS_DATADIR /opt/geoserver/data

ENV CATALINA_OPTS="-DGEOSERVER_DATA_DIR=$GS_DATADIR"

RUN mkdir -p $GS_DATADIR && chown tomcat8 $GS_DATADIR

RUN curl -L $GS_URL/$GS_VERSION/geoserver-$GS_VERSION-war.zip > gs.zip &&\
    unzip -d $CATALINA_BASE/webapps/ gs.zip geoserver.war &&\
    rm gs.zip

EXPOSE 8080

USER tomcat8

RUN mkdir $CATALINA_TMPDIR

CMD ["/usr/share/tomcat8/bin/catalina.sh", "run"]