annotate docker/Dockerfile.artifacts @ 9771:70b54e20c098 3.2.x

Mark runtime dependency
author Tom Gottfried <tom@intevation.de>
date Mon, 16 Jan 2023 17:24:09 +0100
parents b5d4cb088737
children e5b86f024141
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:
9732
a6c6bba0fc4b Run yum commands silently
Tom Gottfried <tom@intevation.de>
parents: 9731
diff changeset
8 RUN yum -q -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
9732
a6c6bba0fc4b Run yum commands silently
Tom Gottfried <tom@intevation.de>
parents: 9731
diff changeset
11 RUN yum -q -y install maven mercurial curl
9716
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
9764
b5d4cb088737 Add named volume for DEM data
Tom Gottfried <tom@intevation.de>
parents: 9737
diff changeset
20 # Volume for DEM data
b5d4cb088737 Add named volume for DEM data
Tom Gottfried <tom@intevation.de>
parents: 9737
diff changeset
21 VOLUME $DEM_DIR
b5d4cb088737 Add named volume for DEM data
Tom Gottfried <tom@intevation.de>
parents: 9737
diff changeset
22
9684
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
23
9731
1dfcbb09c231 Improve server deployment in Docker container
Tom Gottfried <tom@intevation.de>
parents: 9726
diff changeset
24 WORKDIR /opt/d4e/src
9684
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
25 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
26 ENV BRANCH 3.2.x
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
27 RUN hg clone -b $BRANCH $REPO_URL/framework
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
28 RUN hg clone -b $BRANCH $REPO_URL/http-client
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
29
9733
93b9034613bc Skip tests in docker build
Tom Gottfried <tom@intevation.de>
parents: 9732
diff changeset
30 RUN mvn -q -DskipTests -f framework/pom.xml install
93b9034613bc Skip tests in docker build
Tom Gottfried <tom@intevation.de>
parents: 9732
diff changeset
31 RUN mvn -q -DskipTests -f http-client/pom.xml install
9684
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
32
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
33 ADD . river
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
34
9733
93b9034613bc Skip tests in docker build
Tom Gottfried <tom@intevation.de>
parents: 9732
diff changeset
35 RUN mvn -q -DskipTests -f river/backend/pom.xml install
9684
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
36
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
37 WORKDIR river/artifacts
9716
c3afc0274bba Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents: 9715
diff changeset
38
c3afc0274bba Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents: 9715
diff changeset
39 # Install WSPLGEN
c3afc0274bba Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents: 9715
diff changeset
40 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
41 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
42
c3afc0274bba Improve Docker-based development setup
Tom Gottfried <tom@intevation.de>
parents: 9715
diff changeset
43 # Create h2 databases
9731
1dfcbb09c231 Improve server deployment in Docker container
Tom Gottfried <tom@intevation.de>
parents: 9726
diff changeset
44 RUN ../../framework/artifact-database/bin/createArtifacts.sh
1dfcbb09c231 Improve server deployment in Docker container
Tom Gottfried <tom@intevation.de>
parents: 9726
diff changeset
45 RUN ./bin/createDatacage.sh
1dfcbb09c231 Improve server deployment in Docker container
Tom Gottfried <tom@intevation.de>
parents: 9726
diff changeset
46
9733
93b9034613bc Skip tests in docker build
Tom Gottfried <tom@intevation.de>
parents: 9732
diff changeset
47 RUN mvn -q -DskipTests package assembly:single
9684
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
48
9731
1dfcbb09c231 Improve server deployment in Docker container
Tom Gottfried <tom@intevation.de>
parents: 9726
diff changeset
49 WORKDIR /opt/d4e/bin
1dfcbb09c231 Improve server deployment in Docker container
Tom Gottfried <tom@intevation.de>
parents: 9726
diff changeset
50 RUN useradd d4e
1dfcbb09c231 Improve server deployment in Docker container
Tom Gottfried <tom@intevation.de>
parents: 9726
diff changeset
51 RUN chown d4e:d4e .
1dfcbb09c231 Improve server deployment in Docker container
Tom Gottfried <tom@intevation.de>
parents: 9726
diff changeset
52 USER d4e
1dfcbb09c231 Improve server deployment in Docker container
Tom Gottfried <tom@intevation.de>
parents: 9726
diff changeset
53
1dfcbb09c231 Improve server deployment in Docker container
Tom Gottfried <tom@intevation.de>
parents: 9726
diff changeset
54 RUN tar -xf ../src/river/artifacts/target/river-artifacts-1.0-SNAPSHOT-bin.tar
1dfcbb09c231 Improve server deployment in Docker container
Tom Gottfried <tom@intevation.de>
parents: 9726
diff changeset
55
1dfcbb09c231 Improve server deployment in Docker container
Tom Gottfried <tom@intevation.de>
parents: 9726
diff changeset
56 CMD bin/run.sh

http://dive4elements.wald.intevation.org