LXCize MifosX build
This commit is contained in:
parent
cecb8d7dba
commit
444cfb58b1
@ -1,36 +0,0 @@
|
||||
FROM tomcat
|
||||
LABEL maintainer="Disassembler <disassembler@dasm.cz>"
|
||||
|
||||
RUN \
|
||||
# Install full-featured wget to work around sourceforge bugs
|
||||
apk --no-cache add wget \
|
||||
# Download Mifos X
|
||||
&& wget https://sourceforge.net/projects/mifos/files/latest/download -O /tmp/mifosx.zip \
|
||||
&& mkdir /srv/tomcat/webapps/fineract-provider \
|
||||
&& unzip /tmp/mifosx.zip -d /tmp \
|
||||
&& unzip /tmp/fineractplatform-18.03.01.RELEASE/fineract-provider.war -d /srv/tomcat/webapps/fineract-provider \
|
||||
&& mv /tmp/fineractplatform-18.03.01.RELEASE/apps/community-app /srv/tomcat/webapps/ROOT \
|
||||
&& mv /tmp/fineractplatform-18.03.01.RELEASE/database/mifospltaform-tenants-first-time-install.sql /tmp/mifospltaform-tenants-first-time-install.sql \
|
||||
# Download Java library dependencies
|
||||
&& wget http://central.maven.org/maven2/org/drizzle/jdbc/drizzle-jdbc/1.3/drizzle-jdbc-1.3.jar -O /srv/tomcat/lib/drizzle-jdbc-1.3.jar \
|
||||
# Create OS user
|
||||
&& addgroup -S -g 8012 mifosx \
|
||||
&& adduser -S -u 8012 -h /srv/tomcat -s /bin/false -g mifosx -G mifosx mifosx \
|
||||
&& chown -R mifosx:mifosx /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work \
|
||||
# Cleanup
|
||||
&& apk --no-cache del wget \
|
||||
&& rm -rf /tmp/fineractplatform-18.03.01.RELEASE /tmp/mifosx.zip
|
||||
|
||||
COPY docker/tmp/ /tmp/
|
||||
|
||||
RUN \
|
||||
# Update Czech translation of community-app
|
||||
wget 'https://translatewiki.net/wiki/Special:ExportTranslations?group=out-mifos&language=cs&format=export-to-file' -O /srv/tomcat/webapps/ROOT/global-translations/locale-cs.json \
|
||||
&& cd /srv/tomcat/webapps/ROOT/scripts/ \
|
||||
&& patch -p0 </tmp/locale-cs.patch
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
USER mifosx
|
||||
WORKDIR /srv/tomcat
|
||||
CMD ["catalina.sh", "run"]
|
44
mifosx/lxcfile
Normal file
44
mifosx/lxcfile
Normal file
@ -0,0 +1,44 @@
|
||||
IMAGE mifosx
|
||||
LAYER shared/alpine
|
||||
LAYER shared/java
|
||||
LAYER shared/tomcat
|
||||
LAYER mifosx/mifosx
|
||||
|
||||
COPY lxc
|
||||
|
||||
RUN EOF
|
||||
# Install full-featured wget to work around sourceforge bugs
|
||||
apk --no-cache add wget
|
||||
|
||||
# Download Mifos X
|
||||
wget https://sourceforge.net/projects/mifos/files/latest/download -O /tmp/mifosx.zip
|
||||
mkdir /srv/tomcat/webapps/fineract-provider
|
||||
unzip /tmp/mifosx.zip -d /tmp
|
||||
unzip /tmp/fineractplatform-18.03.01.RELEASE/fineract-provider.war -d /srv/tomcat/webapps/fineract-provider
|
||||
mv /tmp/fineractplatform-18.03.01.RELEASE/apps/community-app /srv/tomcat/webapps/ROOT
|
||||
mv /tmp/fineractplatform-18.03.01.RELEASE/database/mifospltaform-tenants-first-time-install.sql /tmp/mifospltaform-tenants-first-time-install.sql
|
||||
|
||||
# Download Java library dependencies
|
||||
wget http://central.maven.org/maven2/org/drizzle/jdbc/drizzle-jdbc/1.3/drizzle-jdbc-1.3.jar -O /srv/tomcat/lib/drizzle-jdbc-1.3.jar
|
||||
|
||||
# Create OS user
|
||||
addgroup -S -g 8012 mifosx
|
||||
adduser -S -u 8012 -h /srv/tomcat -s /bin/false -g mifosx -G mifosx mifosx
|
||||
chown -R mifosx:mifosx /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work
|
||||
|
||||
# Cleanup
|
||||
apk --no-cache del wget
|
||||
rm -rf /tmp/fineractplatform-18.03.01.RELEASE /tmp/mifosx.zip
|
||||
|
||||
# Update Czech translation of community-app
|
||||
wget 'https://translatewiki.net/wiki/Special:ExportTranslations?group=out-mifos&language=cs&format=export-to-file' -O /srv/tomcat/webapps/ROOT/global-translations/locale-cs.json
|
||||
cd /srv/tomcat/webapps/ROOT/scripts/
|
||||
|
||||
# Apply translation patch
|
||||
patch -p0 </tmp/locale-cs.patch
|
||||
rm /tmp/locale-cs.patch
|
||||
EOF
|
||||
|
||||
USER 8012 8012
|
||||
WORKDIR /srv/tomcat
|
||||
CMD /usr/bin/catalina.sh run
|
Loading…
Reference in New Issue
Block a user