From b5d30b13d7e0f7653e15b658c33960a402855f92 Mon Sep 17 00:00:00 2001 From: Andre Zoledziowski Date: Thu, 28 Jun 2018 10:39:09 +0200 Subject: [PATCH] Added comfort functions & minor --- core/Dockerfile | 5 +-- core/start-service.sh | 2 +- repoproxy/start.sh | 2 +- ssl/start.sh | 2 +- webapp/Dockerfile | 78 +++++++++++++++++++++++++------------------ webapp/start.sh | 1 - 6 files changed, 51 insertions(+), 39 deletions(-) diff --git a/core/Dockerfile b/core/Dockerfile index a1bf61b..f6e9e3b 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -37,12 +37,13 @@ ARG KOPANO_CORE_VERSION=newest ARG KOPANO_REPOSITORY_BRANCH=master ARG KOPANO_CORE_REPOSITORY_URL="http://buildproxy/supported/core:/${KOPANO_REPOSITORY_BRANCH}/Debian_9.0" ARG KOPANO_REPOSITORY_FLAGS="trusted=yes" +ARG NO_RELEASE_KEY_DOWNLOAD=0 # install kopano components RUN set -x && \ echo ${KOPANO_CORE_VERSION} > /kopano/buildversion && \ - echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano-core.list && \ - curl -s -S -o - "${KOPANO_CORE_REPOSITORY_URL}/Release.key" | apt-key add - && \ + echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano-core.list; \ + (exit ${NO_RELEASE_KEY_DOWNLOAD}) && curl -s -S -o - "${KOPANO_CORE_REPOSITORY_URL}/Release.key" | apt-key add -; \ apt-get update && \ apt-get install --no-install-recommends -y \ kopano-server-packages="${KOPANO_CORE_VERSION}" \ diff --git a/core/start-service.sh b/core/start-service.sh index bc4d911..db1355b 100644 --- a/core/start-service.sh +++ b/core/start-service.sh @@ -44,4 +44,4 @@ case "$SERVICE_TO_START" in *) echo "Failed to start: Unknown service name: '$SERVICE_TO_START'" | ts exit 1 -esac \ No newline at end of file +esac diff --git a/repoproxy/start.sh b/repoproxy/start.sh index 53641de..88bb0da 100644 --- a/repoproxy/start.sh +++ b/repoproxy/start.sh @@ -10,4 +10,4 @@ export B64_CREDS=$(echo "$KOPANO_USER:$KOPANO_SERIAL" | base64) cat /buildproxy/default.conf | envsubst > /etc/nginx/conf.d/default.conf # run reverse proxy -exec nginx -g "daemon off;" \ No newline at end of file +exec nginx -g "daemon off;" diff --git a/ssl/start.sh b/ssl/start.sh index 17c488d..04e22ac 100644 --- a/ssl/start.sh +++ b/ssl/start.sh @@ -5,4 +5,4 @@ if [ -f /kopano/ssl/ca.pem ] then exit 0 fi -/gencerts.sh \ No newline at end of file +/gencerts.sh diff --git a/webapp/Dockerfile b/webapp/Dockerfile index a62c2f6..61fe5d4 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -23,57 +23,69 @@ RUN apt-get update && \ # If you have active Kopano subscription you can change KOPANO_WEBAPP_REPOSITORY_URL to # https://serial:@download.kopano.io/supported/webapp:/final/Debian_9.0 # and replace with your serial. You can also use pre-final or any other repository branch. -# docker build --build-arg KOPANO_WEBAPP_REPOSITORY_URL=https://serial:@download.kopano.io/supported/webapp:/final/Debian_9.0 https://github.com/ZokRadonh/KopanoDocker.git#:webapp +# docker build --build-arg KOPANO_WEBAPP_REPOSITORY_URL=https://serial:@download.kopano.io/supported/webapp:/final/Debian_9.0 https://github.com/zokradonh/kopano-docker.git#:webapp # Do the same with KOPANO_CORE_REPOSITORY as webapp needs some packages from core. -# If you want to use community version please use images from hub.docker.com +# If you want to use community version please use images from hub.docker.com. # Changing KOPANO_WEBAPP_VERSION does not really change the resulting image. ARG KOPANO_WEBAPP_VERSION=newest ARG KOPANO_REPOSITORY_BRANCH=master ARG KOPANO_WEBAPP_REPOSITORY_URL="http://buildproxy/supported/webapp:/${KOPANO_REPOSITORY_BRANCH}/Debian_9.0" ARG KOPANO_CORE_REPOSITORY_URL="http://buildproxy/supported/core:/${KOPANO_REPOSITORY_BRANCH}/Debian_9.0" ARG KOPANO_REPOSITORY_FLAGS="trusted=yes" +ARG NO_RELEASE_KEY_DOWNLOAD=0 # install kopano web app and refresh ca-certificates RUN echo ${KOPANO_WEBAPP_VERSION} > /kopano/buildversion && \ echo "deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /" > /etc/apt/sources.list.d/zpush.list && \ echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_WEBAPP_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano-webapp.list && \ - echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano-core.list && \ - curl -s -S -o - "${KOPANO_WEBAPP_REPOSITORY_URL}/Release.key" | apt-key add - && \ - curl -s -S -o - "${KOPANO_CORE_REPOSITORY_URL}/Release.key" | apt-key add - && \ + echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano-core.list; \ + (exit ${NO_RELEASE_KEY_DOWNLOAD}) && curl -s -S -o - "${KOPANO_WEBAPP_REPOSITORY_URL}/Release.key" | apt-key add -; \ + (exit ${NO_RELEASE_KEY_DOWNLOAD}) && curl -s -S -o - "${KOPANO_CORE_REPOSITORY_URL}/Release.key" | apt-key add -; \ curl -s -S -o - "http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key" | apt-key add - && \ apt-get update && apt-get install -y --no-install-recommends \ - apache2 \ - libapache2-mod-php7.0 \ - crudini \ - z-push-backend-kopano \ - z-push-config-apache \ - ca-certificates \ - kopano-webapp \ - kopano-webapp-plugin-contactfax \ - kopano-webapp-plugin-desktopnotifications \ - kopano-webapp-plugin-filepreviewer \ - kopano-webapp-plugin-folderwidgets \ -# kopano-webapp-plugin-gmaps \ - kopano-webapp-plugin-pimfolder \ - kopano-webapp-plugin-quickitems \ -# kopano-webapp-plugin-spell-de-at \ -# kopano-webapp-plugin-spell-de-ch \ - kopano-webapp-plugin-spell-de-de \ - kopano-webapp-plugin-spell-en-gb \ - kopano-webapp-plugin-spell-en \ -# kopano-webapp-plugin-spell-es \ -# kopano-webapp-plugin-spell-fr \ -# kopano-webapp-plugin-spell-nl \ -# kopano-webapp-plugin-spell-pl-pl \ - kopano-webapp-plugin-spell \ -# kopano-webapp-plugin-titlecounter \ -# kopano-webapp-plugin-webappmanual \ -# kopano-webapp-plugin-zdeveloper \ + apache2 \ + libapache2-mod-php7.0 \ + crudini \ + z-push-backend-kopano \ + z-push-config-apache \ + ca-certificates \ + kopano-webapp \ + kopano-webapp-plugin-contactfax \ + kopano-webapp-plugin-desktopnotifications \ + kopano-webapp-plugin-filepreviewer \ + kopano-webapp-plugin-folderwidgets \ + kopano-webapp-plugin-gmaps \ + kopano-webapp-plugin-intranet \ + kopano-webapp-plugin-mattermost \ + kopano-webapp-plugin-pimfolder \ + kopano-webapp-plugin-quickitems \ + kopano-webapp-plugin-spell-de-at \ + kopano-webapp-plugin-spell-de-at \ + kopano-webapp-plugin-spell-de-ch \ + kopano-webapp-plugin-spell-de-de \ + kopano-webapp-plugin-spell-de-de \ + kopano-webapp-plugin-spell-en-gb \ + kopano-webapp-plugin-spell-en \ + kopano-webapp-plugin-spell-en \ + kopano-webapp-plugin-spell-es \ + kopano-webapp-plugin-spell-es \ + kopano-webapp-plugin-spell-fr \ + kopano-webapp-plugin-spell-it \ + kopano-webapp-plugin-spell-nl \ + kopano-webapp-plugin-spell-nl \ + kopano-webapp-plugin-spell-pl-pl \ + kopano-webapp-plugin-spell \ + kopano-webapp-plugin-spell \ + kopano-webapp-plugin-titlecounter \ + kopano-webapp-plugin-webappmanual \ + kopano-webapp-plugin-zdeveloper \ + threema4deskapp \ + whatsapp4deskapp \ && rm -rf /var/cache/apt /var/lib/apt/lists COPY apache2-kopano.conf /etc/apache2/sites-available/kopano.conf - # configure basics +# configure basics RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \ dpkg-reconfigure --frontend=noninteractive locales && \ diff --git a/webapp/start.sh b/webapp/start.sh index 0b371a4..c7b18f3 100644 --- a/webapp/start.sh +++ b/webapp/start.sh @@ -28,4 +28,3 @@ rm -f /run/apache2/apache2.pid set +u source /etc/apache2/envvars exec /usr/sbin/apache2 -DFOREGROUND -#exec /bin/bash -c "source /etc/apache2/envvars && /usr/sbin/apache2 -DFOREGROUND"