Create a package with runtimes and make use of it

This commit is contained in:
Disassembler 2018-04-30 23:13:11 +02:00
parent 4be017508b
commit 23e9de7630
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
34 changed files with 45 additions and 89 deletions

View File

@ -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

View File

@ -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

11
basic-runtimes.sh Normal file
View File

@ -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

View File

@ -0,0 +1,6 @@
FROM alpine
MAINTAINER Disassembler <disassembler@dasm.cz>
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

View File

@ -0,0 +1,10 @@
FROM alpine
MAINTAINER Disassembler <disassembler@dasm.cz>
RUN \
# Install XML libs
apk --no-cache add libxml2 libxslt
RUN \
# Install Python2 runtime
apk --no-cache add python2

View File

@ -0,0 +1,11 @@
FROM alpine
MAINTAINER Disassembler <disassembler@dasm.cz>
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

View File

@ -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/ /

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

1
cts.sh
View File

@ -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

View File

@ -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

View File

@ -1,15 +1,6 @@
FROM alpine
FROM python3
MAINTAINER Disassembler <disassembler@dasm.cz>
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 \

View File

@ -1,6 +0,0 @@
#!/bin/sh
SOURCE_DIR=$(realpath $(dirname "${0}"))/java
# Build Docker container
docker build -t java ${SOURCE_DIR}

View File

@ -1,10 +1,6 @@
FROM alpine
FROM php
MAINTAINER Disassembler <disassembler@dasm.cz>
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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,15 +1,6 @@
FROM alpine
FROM python3
MAINTAINER Disassembler <disassembler@dasm.cz>
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 \

View File

@ -1,6 +0,0 @@
#!/bin/sh
SOURCE_DIR=$(realpath $(dirname "${0}"))/python2
# Build Docker container
docker build -t python2 ${SOURCE_DIR}

View File

@ -1,6 +0,0 @@
FROM alpine
MAINTAINER Disassembler <disassembler@dasm.cz>
RUN \
# Install Python2 runtime
apk --no-cache add libxml2 libxslt python2

View File

@ -1,6 +0,0 @@
#!/bin/sh
SOURCE_DIR=$(realpath $(dirname "${0}"))/ruby
# Build Docker container
docker build -t ruby ${SOURCE_DIR}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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}

View File

@ -1,10 +1,6 @@
FROM alpine
FROM php
MAINTAINER Disassembler <disassembler@dasm.cz>
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