Spotter-VM/lxc-apps/opendatakit/opendatakit.image

24 lines
722 B
Plaintext

IMAGE opendatakit_2.0.5-200621
FROM alpine3.11-tomcat8.5_8.5.53-200621
RUN EOF
# Download OpenDataKit
wget https://github.com/getodk/aggregate/releases/download/v2.0.5/ODK-Aggregate-v2.0.5.war -O /tmp/odk.war
mkdir /srv/tomcat/webapps/ROOT
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.11.jar -O /srv/tomcat/webapps/ROOT/WEB-INF/lib/postgresql-42.2.11.jar
# Change webapps ownership
chown -R tomcat:tomcat /srv/tomcat/webapps
# Cleanup
rm /tmp/odk.war
EOF
USER tomcat
WORKDIR /srv/tomcat
CMD /usr/bin/catalina.sh run