2019-09-18 11:29:58 +02:00
|
|
|
IMAGE motech_1.3.0-190620
|
2019-06-25 15:56:35 +02:00
|
|
|
|
2019-09-18 11:29:58 +02:00
|
|
|
LAYER alpine3.9_3.9.4-190620
|
|
|
|
LAYER alpine3.9-java8_8.212.04-190620
|
|
|
|
LAYER alpine3.9-tomcat7_7.0.94-190620
|
2018-09-13 13:39:25 +02:00
|
|
|
|
|
|
|
RUN EOF
|
|
|
|
# Download Motech
|
|
|
|
wget http://nexus.motechproject.org/service/local/repositories/releases/content/org/motechproject/motech-platform-server/1.3/motech-platform-server-1.3.war -O /tmp/motech.war
|
|
|
|
mkdir /srv/tomcat/webapps/ROOT
|
|
|
|
unzip /tmp/motech.war -d /srv/tomcat/webapps/ROOT
|
|
|
|
|
|
|
|
# Update Postgres JDBC driver
|
|
|
|
rm -f /srv/tomcat/webapps/ROOT/WEB-INF/lib/postgresql-9.1-901.jdbc4.jar /srv/tomcat/webapps/ROOT/WEB-INF/bundles/postgresql-9.1-901.jdbc4.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
|
|
|
|
cp /srv/tomcat/webapps/ROOT/WEB-INF/lib/postgresql-42.2.5.jar /srv/tomcat/webapps/ROOT/WEB-INF/bundles/postgresql-42.2.5.jar
|
|
|
|
|
|
|
|
# Create OS user
|
|
|
|
addgroup -S -g 8013 motech
|
|
|
|
adduser -S -u 8013 -h /srv/tomcat -s /bin/false -g motech -G motech motech
|
|
|
|
chown -R motech:motech /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work
|
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
rm -f /tmp/motech.war
|
|
|
|
EOF
|
|
|
|
|
2018-09-14 18:13:11 +02:00
|
|
|
MOUNT DIR /srv/motech/conf srv/tomcat/.motech
|
2018-09-13 13:39:25 +02:00
|
|
|
|
|
|
|
USER 8013 8013
|
|
|
|
WORKDIR /srv/tomcat
|
2018-09-13 16:21:16 +02:00
|
|
|
CMD catalina.sh run
|