diff --git a/00-install.sh b/00-install.sh index 9a0fa50..a74a09f 100755 --- a/00-install.sh +++ b/00-install.sh @@ -7,6 +7,7 @@ SOURCE_DIR=$(realpath $(dirname "${0}")) # Install shared packages and perform OS customization ${SOURCE_DIR}/basic.sh +${SOURCE_DIR}/basic-runtimes.sh # Install applications ${SOURCE_DIR}/ckan.sh diff --git a/activemq.sh b/activemq.sh index e9956c7..f2910dc 100755 --- a/activemq.sh +++ b/activemq.sh @@ -2,9 +2,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/activemq -# Check prerequisites -docker image ls | grep -q java || $(realpath $(dirname "${0}"))/java.sh - # Build Docker container docker build -t activemq ${SOURCE_DIR} cp ${SOURCE_DIR}/etc/init.d/activemq /etc/init.d/activemq diff --git a/basic-runtimes.sh b/basic-runtimes.sh new file mode 100644 index 0000000..7e8fb08 --- /dev/null +++ b/basic-runtimes.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +SOURCE_DIR=$(realpath $(dirname "${0}"))/basic-runtimes + +# Build Docker images +docker build -t java ${SOURCE_DIR}/java.Dockerfile +docker build -t php ${SOURCE_DIR}/php.Dockerfile +docker build -t python2 ${SOURCE_DIR}/python2.Dockerfile +docker build -t python3 ${SOURCE_DIR}/python3.Dockerfile +docker build -t ruby ${SOURCE_DIR}/ruby.Dockerfile +docker build -t tomcat ${SOURCE_DIR}/tomcat.Dockerfile diff --git a/java/Dockerfile b/basic-runtimes/java.Dockerfile similarity index 100% rename from java/Dockerfile rename to basic-runtimes/java.Dockerfile diff --git a/basic-runtimes/php.Dockerfile b/basic-runtimes/php.Dockerfile new file mode 100644 index 0000000..7849d57 --- /dev/null +++ b/basic-runtimes/php.Dockerfile @@ -0,0 +1,6 @@ +FROM alpine +MAINTAINER Disassembler + +RUN \ + # Install PHP runtime + apk --no-cache add nginx php7 php7-ctype php7-fpm php7-gd php7-json php7-mbstring php7-mcrypt php7-opcache php7-session diff --git a/basic-runtimes/python2.Dockerfile b/basic-runtimes/python2.Dockerfile new file mode 100644 index 0000000..e5b1575 --- /dev/null +++ b/basic-runtimes/python2.Dockerfile @@ -0,0 +1,10 @@ +FROM alpine +MAINTAINER Disassembler + +RUN \ + # Install XML libs + apk --no-cache add libxml2 libxslt + +RUN \ + # Install Python2 runtime + apk --no-cache add python2 diff --git a/basic-runtimes/python3.Dockerfile b/basic-runtimes/python3.Dockerfile new file mode 100644 index 0000000..2832c53 --- /dev/null +++ b/basic-runtimes/python3.Dockerfile @@ -0,0 +1,11 @@ +FROM alpine +MAINTAINER Disassembler + +RUN \ + # Install XML libs + apk --no-cache add libxml2 libxslt + +RUN \ + # Install Python3 runtime + apk --no-cache add python3 \ + && ln -s /usr/bin/python3 /usr/bin/python diff --git a/ruby/Dockerfile b/basic-runtimes/ruby.Dockerfile similarity index 100% rename from ruby/Dockerfile rename to basic-runtimes/ruby.Dockerfile diff --git a/tomcat/Dockerfile b/basic-runtimes/tomcat.Dockerfile similarity index 96% rename from tomcat/Dockerfile rename to basic-runtimes/tomcat.Dockerfile index 45e0dc6..dd9787f 100644 --- a/tomcat/Dockerfile +++ b/basic-runtimes/tomcat.Dockerfile @@ -12,4 +12,4 @@ RUN \ && 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/ / +COPY tomcat.docker/ / diff --git a/tomcat/docker/srv/tomcat/bin/setenv.sh b/basic-runtimes/tomcat.docker/srv/tomcat/bin/setenv.sh similarity index 100% rename from tomcat/docker/srv/tomcat/bin/setenv.sh rename to basic-runtimes/tomcat.docker/srv/tomcat/bin/setenv.sh diff --git a/tomcat/docker/srv/tomcat/conf/logging.properties b/basic-runtimes/tomcat.docker/srv/tomcat/conf/logging.properties similarity index 100% rename from tomcat/docker/srv/tomcat/conf/logging.properties rename to basic-runtimes/tomcat.docker/srv/tomcat/conf/logging.properties diff --git a/basic.sh b/basic.sh index b68a162..44b9f49 100755 --- a/basic.sh +++ b/basic.sh @@ -57,7 +57,7 @@ cp ${SOURCE_DIR}/etc/init.d/docker /etc/init.d/docker rc-update add docker service docker start -# Create basic image +# Create basic images docker build -t alpine ${SOURCE_DIR} # Set dummy domain and generate related files diff --git a/ckan-datapusher.sh b/ckan-datapusher.sh index b74dcd8..45c9931 100755 --- a/ckan-datapusher.sh +++ b/ckan-datapusher.sh @@ -2,9 +2,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/ckan-datapusher -# Check prerequisites -docker image ls | grep -q python2 || $(realpath $(dirname "${0}"))/python2.sh - # Build Docker container docker build -t ckan-datapusher ${SOURCE_DIR} cp ${SOURCE_DIR}/etc/init.d/ckan-datapusher /etc/init.d/ckan-datapusher diff --git a/ckan.sh b/ckan.sh index 1504b2e..2ed65ca 100755 --- a/ckan.sh +++ b/ckan.sh @@ -6,7 +6,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/ckan docker image ls | grep -q ckan-datapusher || $(realpath $(dirname "${0}"))/ckan-datapusher.sh docker image ls | grep -q postfix || $(realpath $(dirname "${0}"))/postfix.sh docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh -docker image ls | grep -q python2 || $(realpath $(dirname "${0}"))/python2.sh docker image ls | grep -q redis || $(realpath $(dirname "${0}"))/redis.sh docker image ls | grep -q solr || $(realpath $(dirname "${0}"))/solr.sh service postgres start diff --git a/crisiscleanup.sh b/crisiscleanup.sh index bec50b1..69f0e29 100755 --- a/crisiscleanup.sh +++ b/crisiscleanup.sh @@ -5,7 +5,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/crisiscleanup # Check prerequisites docker image ls | grep -q postfix || $(realpath $(dirname "${0}"))/postfix.sh docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh -docker image ls | grep -q ruby || $(realpath $(dirname "${0}"))/ruby.sh service postgres start # Build Docker container diff --git a/cts.sh b/cts.sh index c9af209..6e0fc67 100755 --- a/cts.sh +++ b/cts.sh @@ -4,7 +4,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/cts # Check prerequisites docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh -docker image ls | grep -q python2 || $(realpath $(dirname "${0}"))/python2.sh service postgres start # Build Docker container diff --git a/frontlinesms.sh b/frontlinesms.sh index 0096754..b2f8725 100755 --- a/frontlinesms.sh +++ b/frontlinesms.sh @@ -2,9 +2,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/frontlinesms -# Check prerequisites -docker image ls | grep -q java || $(realpath $(dirname "${0}"))/java.sh - # Build Docker container docker build -t frontlinesms ${SOURCE_DIR} cp ${SOURCE_DIR}/etc/init.d/frontlinesms /etc/init.d/frontlinesms diff --git a/gnuhealth/Dockerfile b/gnuhealth/Dockerfile index 3f1fd39..4186860 100644 --- a/gnuhealth/Dockerfile +++ b/gnuhealth/Dockerfile @@ -1,15 +1,6 @@ -FROM alpine +FROM python3 MAINTAINER Disassembler -RUN \ - # Install Python3 runtime - apk --no-cache add python3 \ - && ln -s /usr/bin/python3 /usr/bin/python - -RUN \ - # Install runtime XML dependencies - apk --no-cache add libxml2 libxslt - RUN \ # Install NodeJS runtime apk --no-cache add nodejs paxctl \ diff --git a/java.sh b/java.sh deleted file mode 100755 index 75febc3..0000000 --- a/java.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -SOURCE_DIR=$(realpath $(dirname "${0}"))/java - -# Build Docker container -docker build -t java ${SOURCE_DIR} diff --git a/kanboard/Dockerfile b/kanboard/Dockerfile index 87bfcec..cb88a82 100644 --- a/kanboard/Dockerfile +++ b/kanboard/Dockerfile @@ -1,10 +1,6 @@ -FROM alpine +FROM php MAINTAINER Disassembler -RUN \ - # Install PHP runtime - apk --no-cache add nginx php7 php7-ctype php7-fpm php7-gd php7-json php7-mbstring php7-mcrypt php7-opcache php7-session - RUN \ # Install runtime dependencies apk --no-cache add php7-dom php7-iconv php7-openssl php7-pdo_pgsql php7-posix php7-simplexml php7-sockets php7-xml php7-zip php7-zlib diff --git a/mifosx.sh b/mifosx.sh index 1e14810..83e672c 100755 --- a/mifosx.sh +++ b/mifosx.sh @@ -5,7 +5,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/mifosx # Check prerequisites docker image ls | grep -q mariadb || $(realpath $(dirname "${0}"))/mariadb.sh docker image ls | grep -q postfix || $(realpath $(dirname "${0}"))/postfix.sh -docker image ls | grep -q tomcat || $(realpath $(dirname "${0}"))/tomcat.sh service mariadb start # Build Docker container diff --git a/motech.sh b/motech.sh index 9edb590..3860edb 100755 --- a/motech.sh +++ b/motech.sh @@ -6,7 +6,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/motech docker image ls | grep -q activemq || $(realpath $(dirname "${0}"))/activemq.sh docker image ls | grep -q postfix || $(realpath $(dirname "${0}"))/postfix.sh docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh -docker image ls | grep -q tomcat || $(realpath $(dirname "${0}"))/tomcat.sh service postgres start # Build Docker container diff --git a/opendatakit-build.sh b/opendatakit-build.sh index 7d9ecdc..4b9f597 100755 --- a/opendatakit-build.sh +++ b/opendatakit-build.sh @@ -4,7 +4,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/opendatakit-build # Check prerequisites docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh -docker image ls | grep -q ruby || $(realpath $(dirname "${0}"))/ruby.sh service postgres start # Build Docker container diff --git a/opendatakit.sh b/opendatakit.sh index 5244c0c..620a740 100755 --- a/opendatakit.sh +++ b/opendatakit.sh @@ -5,7 +5,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/opendatakit # Check prerequisites docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh docker image ls | grep -q postfix || $(realpath $(dirname "${0}"))/postfix.sh -docker image ls | grep -q tomcat || $(realpath $(dirname "${0}"))/tomcat.sh service postgres start # Build Docker container diff --git a/openmapkit.sh b/openmapkit.sh index a4ff4ec..1049fea 100755 --- a/openmapkit.sh +++ b/openmapkit.sh @@ -2,9 +2,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/openmapkit -# Check prerequisites -docker image ls | grep -q java || $(realpath $(dirname "${0}"))/java.sh - # Build Docker container docker build -t openmapkit ${SOURCE_DIR} cp ${SOURCE_DIR}/etc/init.d/openmapkit /etc/init.d/openmapkit diff --git a/pandora/Dockerfile b/pandora/Dockerfile index 0757ec3..6b10f30 100644 --- a/pandora/Dockerfile +++ b/pandora/Dockerfile @@ -1,15 +1,6 @@ -FROM alpine +FROM python3 MAINTAINER Disassembler -RUN \ - # Install Python3 runtime - apk --no-cache add python3 \ - && ln -s /usr/bin/python3 /usr/bin/python - -RUN \ - # Install runtime XML dependencies - apk --no-cache add libxml2 libxslt - RUN \ # Install runtime dependencies apk --no-cache add ffmpeg imagemagick imlib2 libogg libtheora libvpx mkvtoolnix nginx poppler-utils py3-geoip py3-lxml py3-numpy py3-pillow py3-psycopg2 \ diff --git a/python2.sh b/python2.sh deleted file mode 100755 index 2dff104..0000000 --- a/python2.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -SOURCE_DIR=$(realpath $(dirname "${0}"))/python2 - -# Build Docker container -docker build -t python2 ${SOURCE_DIR} diff --git a/python2/Dockerfile b/python2/Dockerfile deleted file mode 100644 index a0b0995..0000000 --- a/python2/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM alpine -MAINTAINER Disassembler - -RUN \ - # Install Python2 runtime - apk --no-cache add libxml2 libxslt python2 diff --git a/ruby.sh b/ruby.sh deleted file mode 100755 index bfb8deb..0000000 --- a/ruby.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -SOURCE_DIR=$(realpath $(dirname "${0}"))/ruby - -# Build Docker container -docker build -t ruby ${SOURCE_DIR} diff --git a/sahana.sh b/sahana.sh index 41c4efe..46a9f06 100755 --- a/sahana.sh +++ b/sahana.sh @@ -5,7 +5,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/sahana # Check prerequisites docker image ls | grep -q postfix || $(realpath $(dirname "${0}"))/postfix.sh docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh -docker image ls | grep -q python2 || $(realpath $(dirname "${0}"))/python2.sh service postgres start # Build Docker container diff --git a/sigmah.sh b/sigmah.sh index 3670b56..1ea8c7c 100755 --- a/sigmah.sh +++ b/sigmah.sh @@ -5,7 +5,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/sigmah # Check prerequisites docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh docker image ls | grep -q postfix || $(realpath $(dirname "${0}"))/postfix.sh -docker image ls | grep -q tomcat || $(realpath $(dirname "${0}"))/tomcat.sh service postgres start # Build Docker container diff --git a/solr.sh b/solr.sh index 4155e6f..14a9069 100755 --- a/solr.sh +++ b/solr.sh @@ -2,9 +2,6 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/solr -# Check prerequisites -docker image ls | grep -q java || $(realpath $(dirname "${0}"))/java.sh - # Build Docker container docker build -t solr ${SOURCE_DIR} cp ${SOURCE_DIR}/etc/init.d/solr /etc/init.d/solr diff --git a/tomcat.sh b/tomcat.sh deleted file mode 100755 index 1cd739b..0000000 --- a/tomcat.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -SOURCE_DIR=$(realpath $(dirname "${0}"))/tomcat - -# Check prerequisites -docker image ls | grep -q java || $(realpath $(dirname "${0}"))/java.sh - -# Build Docker container -docker build -t tomcat ${SOURCE_DIR} diff --git a/ushahidi/Dockerfile b/ushahidi/Dockerfile index bbaa089..eb68828 100644 --- a/ushahidi/Dockerfile +++ b/ushahidi/Dockerfile @@ -1,10 +1,6 @@ -FROM alpine +FROM php MAINTAINER Disassembler -RUN \ - # Install PHP runtime - apk --no-cache add nginx php7 php7-ctype php7-fpm php7-gd php7-json php7-mbstring php7-mcrypt php7-opcache php7-session - RUN \ # Install runtime dependencies apk --no-cache add php7-curl php7-imap php7-mysqli php7-pdo_mysql