2019-09-18 11:29:58 +02:00
|
|
|
IMAGE opendatakit_2.0.3-190620
|
2019-11-30 09:59:32 +01:00
|
|
|
FROM alpine3.9-tomcat8.5_8.5.41-190620
|
2018-09-13 13:42:36 +02:00
|
|
|
|
|
|
|
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
|
2019-10-14 07:59:06 +02:00
|
|
|
addgroup -S -g 8080 odk
|
|
|
|
adduser -S -u 8080 -h /srv/tomcat -s /bin/false -g odk -G odk odk
|
2018-09-13 13:42:36 +02:00
|
|
|
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
|
|
|
|
|
2019-10-14 07:59:06 +02:00
|
|
|
USER 8080 8080
|
2018-09-13 13:42:36 +02:00
|
|
|
WORKDIR /srv/tomcat
|
2018-09-13 16:21:16 +02:00
|
|
|
CMD catalina.sh run
|