Mercurial > dive4elements > river
view docker/Dockerfile.artifacts @ 9720:13e2d38ad314 3.2.x
Improve Docker based setup
_ Make CentOS based images more resilient against package installation
problems
_ Upgrade database image to Debian bullseye to avoid OpenSSL bug that
prevented downloading demo data and do some cleanup in passing
_ Add docker-compose file for more automated setup
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 24 Feb 2022 18:49:02 +0100 |
parents | c3afc0274bba |
children | 654aaa0d7576 |
line wrap: on
line source
# Docker file for D4E River artifact server FROM centos:7 MAINTAINER tom@intevation.de # Necessary to run further yum-installs inside Docker container, # if not already part of the base image: RUN yum -y install yum-plugin-ovl && rpm --rebuilddb # Install prerequisites RUN yum -y install maven mercurial curl # Add DEMs from demo dataset ENV DEM_DIR /opt/d4e-river/dgm ENV DATA_ARCH demodaten_3.1.10-bis-3.2.x.tar.gz RUN mkdir -p $DEM_DIR RUN curl -s "https://wald.intevation.org/frs/download.php/2282/$DATA_ARCH" | \ tar -C $DEM_DIR --strip-components=1 --wildcards -xz 'demodaten/dem*.grd' WORKDIR /opt/d4e ENV REPO_URL https://scm.wald.intevation.org/hg/dive4elements/ ENV BRANCH 3.2.x RUN hg clone -b $BRANCH $REPO_URL/framework RUN hg clone -b $BRANCH $REPO_URL/http-client RUN mvn -q -f framework/pom.xml install RUN mvn -q -f http-client/pom.xml install ADD . river RUN mvn -q -f river/backend/pom.xml install WORKDIR river/artifacts # Install WSPLGEN ENV WSPLGEN_URL https://wald.intevation.org/frs/download.php/1496/wsplgen-linux-64bit-static.gz RUN curl -s $WSPLGEN_URL | gunzip > bin/wsplgen && chmod +x bin/wsplgen # Create h2 databases RUN ../../framework/artifact-database/bin/createArtifacts.sh && \ mv artifactsdb doc/ RUN ./bin/createDatacage.sh && \ mv datacagedb doc/ EXPOSE 8181 CMD mvn -Dexec.mainClass=org.dive4elements.artifactdatabase.App \ -Dartifact.database.dir="/opt/d4e/river/artifacts/doc/conf" \ -Dwsplgen.bin.path="/opt/d4e/river/artifacts/bin/wsplgen" \ compile exec:java