tom@9684: # Docker file for D4E River artifact server tom@9684: tom@9684: FROM centos:7 tom@9684: MAINTAINER tom@intevation.de tom@9684: tom@9715: # Necessary to run further yum-installs inside Docker container, tom@9715: # if not already part of the base image: tom@9720: RUN yum -y install yum-plugin-ovl && rpm --rebuilddb tom@9715: tom@9684: # Install prerequisites tom@9716: RUN yum -y install maven mercurial curl tom@9716: tom@9716: # Add DEMs from demo dataset tom@9716: ENV DEM_DIR /opt/d4e-river/dgm tom@9716: ENV DATA_ARCH demodaten_3.1.10-bis-3.2.x.tar.gz tom@9716: RUN mkdir -p $DEM_DIR tom@9716: RUN curl -s "https://wald.intevation.org/frs/download.php/2282/$DATA_ARCH" | \ tom@9716: tar -C $DEM_DIR --strip-components=1 --wildcards -xz 'demodaten/dem*.grd' tom@9716: tom@9684: tom@9684: WORKDIR /opt/d4e tom@9684: ENV REPO_URL https://scm.wald.intevation.org/hg/dive4elements/ tom@9684: ENV BRANCH 3.2.x tom@9684: RUN hg clone -b $BRANCH $REPO_URL/framework tom@9684: RUN hg clone -b $BRANCH $REPO_URL/http-client tom@9684: tom@9684: RUN mvn -q -f framework/pom.xml install tom@9684: RUN mvn -q -f http-client/pom.xml install tom@9684: tom@9684: ADD . river tom@9684: tom@9684: RUN mvn -q -f river/backend/pom.xml install tom@9684: tom@9684: WORKDIR river/artifacts tom@9716: tom@9716: # Install WSPLGEN tom@9716: ENV WSPLGEN_URL https://wald.intevation.org/frs/download.php/1496/wsplgen-linux-64bit-static.gz tom@9716: RUN curl -s $WSPLGEN_URL | gunzip > bin/wsplgen && chmod +x bin/wsplgen tom@9716: tom@9716: # Create h2 databases tom@9684: RUN ../../framework/artifact-database/bin/createArtifacts.sh && \ tom@9684: mv artifactsdb doc/ tom@9684: RUN ./bin/createDatacage.sh && \ tom@9684: mv datacagedb doc/ tom@9684: tom@9684: EXPOSE 8181 tom@9684: tom@9684: CMD mvn -Dexec.mainClass=org.dive4elements.artifactdatabase.App \ tom@9724: -Dlog4j.configuration="file:///opt/d4e/river/artifacts/doc/conf/log4j.properties" \ tom@9684: -Dartifact.database.dir="/opt/d4e/river/artifacts/doc/conf" \ tom@9716: -Dwsplgen.bin.path="/opt/d4e/river/artifacts/bin/wsplgen" \ tom@9684: compile exec:java