diff --git a/mifosx.sh b/mifosx.sh index b7e4c6e..2682c60 100755 --- a/mifosx.sh +++ b/mifosx.sh @@ -4,6 +4,7 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/mifosx # Check prerequisites docker image ls | grep -q mariadb || $(realpath $(dirname "${0}"))/mariadb.sh +docker image ls | grep -q tomcat || $(realpath $(dirname "${0}"))/tomcat.sh # Build Docker container docker build -t mifosx ${SOURCE_DIR} diff --git a/mifosx/Dockerfile b/mifosx/Dockerfile index de0d714..f024624 100644 --- a/mifosx/Dockerfile +++ b/mifosx/Dockerfile @@ -1,26 +1,6 @@ -FROM alpine:3.7 +FROM tomcat MAINTAINER Disassembler -RUN \ - # Install Java 1.8 JRE - apk --no-cache add openjdk8-jre-base paxctl \ - # Fix grsec attributes to loosen memory protection restrictions - && paxctl -cm /usr/lib/jvm/java-1.8-openjdk/jre/bin/java \ - && paxctl -cm /usr/lib/jvm/java-1.8-openjdk/bin/java \ - # Cleanup - && apk del paxctl - -RUN \ - # Install Tomcat 8 - wget http://mirror.dkm.cz/apache/tomcat/tomcat-8/v8.0.48/bin/apache-tomcat-8.0.48.tar.gz -O /tmp/apache-tomcat-8.tgz \ - && tar xf /tmp/apache-tomcat-8.tgz -C /srv \ - && mv /srv/apache-tomcat-8.0.48 /srv/tomcat \ - # Make catalina.sh available globally - && ln -s /srv/tomcat/bin/catalina.sh /usr/bin/catalina.sh \ - # Cleanup - && rm -rf /srv/tomcat/webapps/ROOT /srv/tomcat/webapps/docs /srv/tomcat/webapps/examples /srv/tomcat/webapps/host-manager /srv/tomcat/webapps/manager \ - && rm -f /tmp/apache-tomcat-8.tgz - RUN \ # Install full-featured wget to work around sourceforge bugs apk --no-cache add wget \ diff --git a/motech.sh b/motech.sh index bc02325..0342321 100755 --- a/motech.sh +++ b/motech.sh @@ -3,9 +3,9 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/motech # Check prerequisites -SCRIPT_DIR=$(realpath $(dirname "${0}")) -docker image ls | grep -q activemq || ${SCRIPT_DIR}/activemq.sh -docker image ls | grep -q postgres || ${SCRIPT_DIR}/postgres.sh +docker image ls | grep -q activemq || $(realpath $(dirname "${0}"))/activemq.sh +docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh +docker image ls | grep -q tomcat || $(realpath $(dirname "${0}"))/tomcat.sh # Build Docker container docker build -t motech ${SOURCE_DIR} diff --git a/motech/Dockerfile b/motech/Dockerfile index 5d96632..f70d782 100644 --- a/motech/Dockerfile +++ b/motech/Dockerfile @@ -1,26 +1,6 @@ -FROM alpine:3.7 +FROM tomcat MAINTAINER Disassembler -RUN \ - # Install Java 1.8 JRE - apk --no-cache add openjdk8-jre-base paxctl \ - # Fix grsec attributes to loosen memory protection restrictions - && paxctl -cm /usr/lib/jvm/java-1.8-openjdk/jre/bin/java \ - && paxctl -cm /usr/lib/jvm/java-1.8-openjdk/bin/java \ - # Cleanup - && apk del paxctl - -RUN \ - # Install Tomcat 8 - wget http://mirror.dkm.cz/apache/tomcat/tomcat-8/v8.0.48/bin/apache-tomcat-8.0.48.tar.gz -O /tmp/apache-tomcat-8.tgz \ - && tar xf /tmp/apache-tomcat-8.tgz -C /srv \ - && mv /srv/apache-tomcat-8.0.48 /srv/tomcat \ - # Make catalina.sh available globally - && ln -s /srv/tomcat/bin/catalina.sh /usr/bin/catalina.sh \ - # Cleanup - && rm -rf /srv/tomcat/webapps/ROOT /srv/tomcat/webapps/docs /srv/tomcat/webapps/examples /srv/tomcat/webapps/host-manager /srv/tomcat/webapps/manager \ - && rm -f /tmp/apache-tomcat-8.tgz - RUN \ # Download Motech wget http://nexus.motechproject.org/service/local/repositories/releases/content/org/motechproject/motech-platform-server/1.0/motech-platform-server-1.0.war -O /tmp/motech.war \ diff --git a/sigmah.sh b/sigmah.sh index 76fc11c..1005807 100755 --- a/sigmah.sh +++ b/sigmah.sh @@ -4,6 +4,7 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/sigmah # Check prerequisites docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh +docker image ls | grep -q tomcat || $(realpath $(dirname "${0}"))/tomcat.sh # Build Docker container docker build -t sigmah ${SOURCE_DIR} diff --git a/sigmah/Dockerfile b/sigmah/Dockerfile index 22a5d6f..c19a07e 100644 --- a/sigmah/Dockerfile +++ b/sigmah/Dockerfile @@ -1,26 +1,6 @@ -FROM alpine:3.7 +FROM tomcat MAINTAINER Disassembler -RUN \ - # Install Java 1.8 JRE - apk --no-cache add openjdk8-jre-base paxctl \ - # Fix grsec attributes to loosen memory protection restrictions - && paxctl -cm /usr/lib/jvm/java-1.8-openjdk/jre/bin/java \ - && paxctl -cm /usr/lib/jvm/java-1.8-openjdk/bin/java \ - # Cleanup - && apk del paxctl - -RUN \ - # Install Tomcat 8 - wget http://mirror.dkm.cz/apache/tomcat/tomcat-8/v8.0.49/bin/apache-tomcat-8.0.49.tar.gz -O /tmp/apache-tomcat-8.tgz \ - && tar xf /tmp/apache-tomcat-8.tgz -C /srv \ - && mv /srv/apache-tomcat-8.0.49 /srv/tomcat \ - # Make catalina.sh available globally - && ln -s /srv/tomcat/bin/catalina.sh /usr/bin/catalina.sh \ - # Cleanup - && rm -rf /srv/tomcat/webapps/ROOT /srv/tomcat/webapps/docs /srv/tomcat/webapps/examples /srv/tomcat/webapps/host-manager /srv/tomcat/webapps/manager \ - && rm -f /tmp/apache-tomcat-8.tgz - RUN \ # Download Sigmah wget https://github.com/sigmah-dev/sigmah/releases/download/v2.0.2/sigmah-2.0.2.war -O /tmp/sigmah.war \ diff --git a/tomcat.sh b/tomcat.sh new file mode 100755 index 0000000..5583801 --- /dev/null +++ b/tomcat.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +SOURCE_DIR=$(realpath $(dirname "${0}"))/tomcat + +# Build Docker container +docker build -t tomcat ${SOURCE_DIR} diff --git a/tomcat/Dockerfile b/tomcat/Dockerfile new file mode 100644 index 0000000..8331276 --- /dev/null +++ b/tomcat/Dockerfile @@ -0,0 +1,24 @@ +FROM alpine:3.7 +MAINTAINER Disassembler + +RUN \ + # Install Java 1.8 JRE + apk --no-cache add openjdk8-jre-base paxctl \ + # Fix grsec attributes to loosen memory protection restrictions + && paxctl -cm /usr/lib/jvm/java-1.8-openjdk/jre/bin/java \ + && paxctl -cm /usr/lib/jvm/java-1.8-openjdk/bin/java \ + # Cleanup + && apk del paxctl + +RUN \ + # Install Tomcat 8 + wget http://mirror.dkm.cz/apache/tomcat/tomcat-8/v8.0.49/bin/apache-tomcat-8.0.49.tar.gz -O /tmp/apache-tomcat-8.tgz \ + && tar xf /tmp/apache-tomcat-8.tgz -C /srv \ + && mv /srv/apache-tomcat-8.0.49 /srv/tomcat \ + # Make catalina.sh available globally + && ln -s /srv/tomcat/bin/catalina.sh /usr/bin/catalina.sh \ + # Cleanup + && rm -rf /srv/tomcat/webapps/ROOT /srv/tomcat/webapps/docs /srv/tomcat/webapps/examples /srv/tomcat/webapps/host-manager /srv/tomcat/webapps/manager \ + && rm -f /tmp/apache-tomcat-8.tgz + +COPY docker/ / diff --git a/tomcat/docker/srv/tomcat/conf/logging.properties b/tomcat/docker/srv/tomcat/conf/logging.properties new file mode 100644 index 0000000..e702cb7 --- /dev/null +++ b/tomcat/docker/srv/tomcat/conf/logging.properties @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +handlers = java.util.logging.ConsoleHandler +.handlers = java.util.logging.ConsoleHandler + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +java.util.logging.ConsoleHandler.level = INFO +java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter