2018-01-26 21:58:29 +01:00
|
|
|
FROM tomcat
|
2018-09-03 22:12:08 +02:00
|
|
|
LABEL maintainer="Disassembler <disassembler@dasm.cz>"
|
2018-01-26 21:25:03 +01:00
|
|
|
|
|
|
|
RUN \
|
|
|
|
# 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 \
|
2018-08-30 18:38:11 +02:00
|
|
|
&& wget https://jdbc.postgresql.org/download/postgresql-42.2.5.jar -O /srv/tomcat/webapps/sigmah/WEB-INF/lib/postgresql-42.2.5.jar \
|
2018-01-26 21:25:03 +01:00
|
|
|
# Remove logging config
|
|
|
|
&& rm /srv/tomcat/webapps/sigmah/WEB-INF/classes/logback.xml \
|
|
|
|
# Create OS user
|
2018-01-27 22:36:57 +01:00
|
|
|
&& addgroup -S -g 8011 sigmah \
|
|
|
|
&& adduser -S -u 8011 -h /srv/tomcat -s /bin/false -g sigmah -G sigmah sigmah \
|
2018-01-26 21:25:03 +01:00
|
|
|
&& chown -R sigmah:sigmah /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work \
|
|
|
|
# Cleanup
|
|
|
|
&& rm /tmp/sigmah.war
|
|
|
|
|
2018-01-26 22:05:03 +01:00
|
|
|
COPY docker/ /
|
|
|
|
|
2018-01-26 21:25:03 +01:00
|
|
|
VOLUME ["/srv/sigmah/data"]
|
2018-03-25 23:21:24 +02:00
|
|
|
EXPOSE 8080
|
2018-01-26 21:25:03 +01:00
|
|
|
|
|
|
|
USER sigmah
|
|
|
|
WORKDIR /srv/tomcat
|
|
|
|
CMD ["catalina.sh", "run"]
|