Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dockerfile for ODK aggregate (WIP)
platform=postgresql
instance_display_name=ODK Aggregate
username=admin
app_id=
jdbc_username=odk_user
jdbc_password=hunter2
jdbc_database=odk
jdbc_schema=odk
jdbc_sqlserver_url=
jdbc_gae_mysql_instance_name=
jdbc_gae_mysql_password=
master_slave_app_id=
is_azure_database_server=0
database_port=5432
database_hostname=db
database_host_port=db
tomcat_authentication_should_configure=0
hostname=localhost
write_properties=1
parent_installdir=/tmp/
http_port=8080
https_port=8443
FROM debian:stretch as build
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
wget
WORKDIR /tmp/
RUN wget -q https://github.com/opendatakit/aggregate/releases/download/v1.5.0/ODK-Aggregate-v1.5.0-Linux-x64.run.zip
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
zip \
unzip
RUN unzip ODK-Aggregate-v1.5.0-Linux-x64.run.zip
COPY ./conf/odk-aggregate-installer-options ./
RUN ./ODK-Aggregate-v1.5.0-Linux-x64.run --mode unattended --optionfile odk-aggregate-installer-options
RUN unzip 'ODK Aggregate/ODKAggregate.war' -d ./ODKAggregate
RUN unzip ./ODKAggregate/WEB-INF/lib/ODKAggregate-settings.jar -d /tmp/ODKAggregate-settings
WORKDIR /tmp/ODKAggregate-settings
RUN sed -i 's/jdbc.username=.*/jdbc.username=${ODK_DB_USER}/' ./jdbc.properties \
&& sed -i 's/jdbc.password=.*/jdbc.password=${ODK_DB_PASSWORD}/' ./jdbc.properties
RUN rm /tmp/ODKAggregate/WEB-INF/lib/ODKAggregate-settings.jar \
&& zip -r /tmp/ODKAggregate/WEB-INF/lib/ODKAggregate-settings.jar *
FROM tomcat:8.5
RUN rm -rf /usr/local/tomcat/webapps/ROOT
COPY --from=build /tmp/ODKAggregate /usr/local/tomcat/webapps/ROOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment