Mercurial > dive4elements > river
annotate docker/Dockerfile.artifacts @ 9727:a99f07471004 3.2.x
Keep config away from Maven Clean Plugin
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 28 Apr 2022 17:30:21 +0200 |
parents | 0a5239a1e46e |
children | 1dfcbb09c231 |
rev | line source |
---|---|
9684
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
1 # Docker file for D4E River artifact server |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
2 |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
3 FROM centos:7 |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
4 MAINTAINER tom@intevation.de |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
5 |
9715
278d285a16bf
Ensure needed packages are installed
Tom Gottfried <tom@intevation.de>
parents:
9684
diff
changeset
|
6 # Necessary to run further yum-installs inside Docker container, |
278d285a16bf
Ensure needed packages are installed
Tom Gottfried <tom@intevation.de>
parents:
9684
diff
changeset
|
7 # if not already part of the base image: |
9720
13e2d38ad314
Improve Docker based setup
Tom Gottfried <tom@intevation.de>
parents:
9716
diff
changeset
|
8 RUN yum -y install yum-plugin-ovl && rpm --rebuilddb |
9715
278d285a16bf
Ensure needed packages are installed
Tom Gottfried <tom@intevation.de>
parents:
9684
diff
changeset
|
9 |
9684
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
10 # Install prerequisites |
9716
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
11 RUN yum -y install maven mercurial curl |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
12 |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
13 # Add DEMs from demo dataset |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
14 ENV DEM_DIR /opt/d4e-river/dgm |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
15 ENV DATA_ARCH demodaten_3.1.10-bis-3.2.x.tar.gz |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
16 RUN mkdir -p $DEM_DIR |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
17 RUN curl -s "https://wald.intevation.org/frs/download.php/2282/$DATA_ARCH" | \ |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
18 tar -C $DEM_DIR --strip-components=1 --wildcards -xz 'demodaten/dem*.grd' |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
19 |
9684
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
20 |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
21 WORKDIR /opt/d4e |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
22 ENV REPO_URL https://scm.wald.intevation.org/hg/dive4elements/ |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
23 ENV BRANCH 3.2.x |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
24 RUN hg clone -b $BRANCH $REPO_URL/framework |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
25 RUN hg clone -b $BRANCH $REPO_URL/http-client |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
26 |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
27 RUN mvn -q -f framework/pom.xml install |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
28 RUN mvn -q -f http-client/pom.xml install |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
29 |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
30 ADD . river |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
31 |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
32 RUN mvn -q -f river/backend/pom.xml install |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
33 |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
34 WORKDIR river/artifacts |
9716
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
35 |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
36 # Install WSPLGEN |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
37 ENV WSPLGEN_URL https://wald.intevation.org/frs/download.php/1496/wsplgen-linux-64bit-static.gz |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
38 RUN curl -s $WSPLGEN_URL | gunzip > bin/wsplgen && chmod +x bin/wsplgen |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
39 |
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
40 # Create h2 databases |
9684
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
41 RUN ../../framework/artifact-database/bin/createArtifacts.sh && \ |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
42 mv artifactsdb doc/ |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
43 RUN ./bin/createDatacage.sh && \ |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
44 mv datacagedb doc/ |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
45 |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
46 EXPOSE 8181 |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
47 |
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
48 CMD mvn -Dexec.mainClass=org.dive4elements.artifactdatabase.App \ |
9726 | 49 -Dlog4j2.configurationFile="file:///opt/d4e/river/artifacts/doc/conf/log4j2.xml" \ |
9684
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
50 -Dartifact.database.dir="/opt/d4e/river/artifacts/doc/conf" \ |
9716
c3afc0274bba
Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents:
9715
diff
changeset
|
51 -Dwsplgen.bin.path="/opt/d4e/river/artifacts/bin/wsplgen" \ |
9684
537fe44f2792
Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
52 compile exec:java |