Spotter-VM/sigmah/lxcfile
Disassembler ce325cf3d0
Squashed commit of the following:
- Bump basic OS to Alpine 3.9
 - Restructure repo and add layer versioning
 - Use JSON for all metadata
 - Merge abuild branch (but without abuild)
2019-02-26 20:24:02 +01:00

38 lines
1.3 KiB
Plaintext

IMAGE sigmah
LAYER shared/alpine3.9
LAYER shared/alpine3.9-java8
LAYER shared/alpine3.9-tomcat8
LAYER sigmah/sigmah
RUN EOF
# Download Sigmah
wget https://github.com/sigmah-dev/sigmah/releases/download/v2.0.2/sigmah-2.0.2.war -O /tmp/sigmah.war
mkdir /srv/tomcat/webapps/sigmah
unzip /tmp/sigmah.war -d /srv/tomcat/webapps/sigmah
# Update Postgres JDBC driver
rm /srv/tomcat/webapps/sigmah/WEB-INF/lib/postgresql-9.1-901-1.jdbc4.jar
wget https://jdbc.postgresql.org/download/postgresql-42.2.5.jar -O /srv/tomcat/webapps/sigmah/WEB-INF/lib/postgresql-42.2.5.jar
# Remove logging config
rm /srv/tomcat/webapps/sigmah/WEB-INF/classes/logback.xml
# Create OS user
addgroup -S -g 8011 sigmah
adduser -S -u 8011 -h /srv/tomcat -s /bin/false -g sigmah -G sigmah sigmah
chown -R sigmah:sigmah /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work
# Cleanup
rm /tmp/sigmah.war
EOF
COPY lxc
MOUNT DIR /srv/sigmah/data srv/sigmah/data
MOUNT FILE /srv/sigmah/conf/persistence.xml srv/tomcat/webapps/sigmah/WEB-INF/classes/META-INF/persistence.xml
MOUNT FILE /srv/sigmah/conf/sigmah.properties srv/tomcat/webapps/sigmah/WEB-INF/classes/sigmah.properties
USER 8011 8011
WORKDIR /srv/tomcat
CMD catalina.sh run