2018-09-13 13:42:36 +02:00
|
|
|
IMAGE opendatakit
|
2019-02-26 20:24:02 +01:00
|
|
|
LAYER shared/alpine3.9
|
|
|
|
LAYER shared/alpine3.9-java8
|
2019-03-01 12:23:22 +01:00
|
|
|
LAYER shared/alpine3.9-tomcat8.5
|
2018-09-13 13:42:36 +02:00
|
|
|
LAYER opendatakit/opendatakit
|
|
|
|
|
|
|
|
RUN EOF
|
2019-03-01 12:23:22 +01:00
|
|
|
# Download OpenDataKit
|
2019-05-08 10:54:03 +02:00
|
|
|
wget https://github.com/opendatakit/aggregate/releases/download/v2.0.3/ODK-Aggregate-v2.0.3.war -O /tmp/odk.war
|
2018-09-13 13:42:36 +02:00
|
|
|
mkdir /srv/tomcat/webapps/ROOT
|
2019-03-01 12:23:22 +01:00
|
|
|
unzip /tmp/odk.war -d /srv/tomcat/webapps/ROOT
|
|
|
|
|
|
|
|
# Update Postgres JDBC driver
|
|
|
|
rm /srv/tomcat/webapps/ROOT/WEB-INF/lib/postgresql-42.1.4.jre7.jar
|
|
|
|
wget https://jdbc.postgresql.org/download/postgresql-42.2.5.jar -O /srv/tomcat/webapps/ROOT/WEB-INF/lib/postgresql-42.2.5.jar
|
2018-09-13 13:42:36 +02:00
|
|
|
|
|
|
|
# Create OS user
|
|
|
|
addgroup -S -g 8015 odk
|
|
|
|
adduser -S -u 8015 -h /srv/tomcat -s /bin/false -g odk -G odk odk
|
|
|
|
chown -R odk:odk /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work
|
|
|
|
|
|
|
|
# Cleanup
|
2019-03-01 12:23:22 +01:00
|
|
|
rm /tmp/odk.war
|
2018-09-13 13:42:36 +02:00
|
|
|
EOF
|
|
|
|
|
2018-09-14 18:13:11 +02:00
|
|
|
MOUNT FILE /srv/opendatakit/conf/server.xml srv/tomcat/conf/server.xml
|
|
|
|
MOUNT FILE /srv/opendatakit/conf/jdbc.properties srv/tomcat/webapps/ROOT/WEB-INF/classes/jdbc.properties
|
|
|
|
MOUNT FILE /srv/opendatakit/conf/security.properties srv/tomcat/webapps/ROOT/WEB-INF/classes/security.properties
|
2018-09-13 14:58:03 +02:00
|
|
|
|
2018-09-13 13:42:36 +02:00
|
|
|
USER 8015 8015
|
|
|
|
WORKDIR /srv/tomcat
|
2018-09-13 16:21:16 +02:00
|
|
|
CMD catalina.sh run
|