forked from roissard/odk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (24 loc) · 1.18 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM tomcat:8.5-jre8-alpine
WORKDIR /app
RUN apk update && apk upgrade && \
apk add openjdk8
#RUN apk update && apk install -y openjdk8
#RUN apt-get update && apt-get install -y default-jdk
#COPY tomcat-users.xml ${CATALINA_HOME}/conf/tomcat-users.xml
#COPY context.xml ${CATALINA_HOME}/webapps/manager/META-INF/context.xml
RUN wget https://jdbc.postgresql.org/download/postgresql-9.4.1209.jre7.jar && \
mv postgresql-9.4.1209.jre7.jar ${CATALINA_HOME}/lib/
#RUN wget https://github.com/opendatakit/aggregate/releases/download/v2.0.3/ODK-Aggregate-v2.0.3.war && \
# mv ODK-Aggregate-v2.0.3.war ${CATALINA_HOME}/webapps/ODK-Aggregate-v2.0.3.war
#COPY ODK-Aggregate-v2.0.3.war ${CATALINA_HOME}/webapps/ODK-Aggregate-v2.0.3.war
COPY ODK-Aggregate-v2.0.3.war jdbc.properties security.properties ./
RUN pwd && mkdir odktemp && \
cd odktemp && \
ls -la /app && \
jar -xvf /app/ODK-Aggregate-v2.0.3.war && \
cp /app/jdbc.properties ./WEB-INF/classes/ && \
cp /app/security.properties ./WEB-INF/classes/ && \
cd /app && \
mkdir ${CATALINA_HOME}/webapps/odk-aggregate && \
rm -fr ${CATALINA_HOME}/webapps/ROOT/* && \
mv odktemp/* ${CATALINA_HOME}/webapps/ROOT