1
0
mirror of https://github.com/zokradonh/kopano-docker synced 2025-06-10 09:26:14 +00:00

Now using dumb-init from Debian repositories.

This commit is contained in:
Andre Zoledziowski 2018-10-02 11:48:03 +02:00
parent fe0d9438c5
commit e1bceb173e
No known key found for this signature in database
GPG Key ID: 2A72044119624966
2 changed files with 125 additions and 127 deletions

View File

@ -18,15 +18,14 @@ RUN apt-get update && \
locales \ locales \
apt-transport-https \ apt-transport-https \
apt-utils jq \ apt-utils jq \
dumb-init \
python3-minimal && \ python3-minimal && \
rm -rf /var/cache/apt /var/lib/apt/lists rm -rf /var/cache/apt /var/lib/apt/lists
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ 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 && \ sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \ dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8 && \ update-locale LANG=en_US.UTF-8
curl -s -S -L -o /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 && \
chmod a+x /usr/local/bin/dumb-init
ARG KOPANO_CORE_VERSION=newest ARG KOPANO_CORE_VERSION=newest
ARG KOPANO_REPOSITORY_BRANCH=master ARG KOPANO_REPOSITORY_BRANCH=master
@ -69,6 +68,6 @@ ENV SERVICE_TO_START=server
COPY kcconf.py defaultconfigs/ start-service.sh /kopano/ COPY kcconf.py defaultconfigs/ start-service.sh /kopano/
RUN chmod a+x /kopano/start-service.sh RUN chmod a+x /kopano/start-service.sh
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"] ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD [ "/kopano/start-service.sh" ] CMD [ "/kopano/start-service.sh" ]

View File

@ -1,124 +1,123 @@
FROM debian:stretch FROM debian:stretch
LABEL maintainer=az@zok.xyz \ LABEL maintainer=az@zok.xyz \
version="2.0" version="2.0"
RUN mkdir -p /kopano/repo /kopano/data RUN mkdir -p /kopano/repo /kopano/data
WORKDIR /kopano/repo WORKDIR /kopano/repo
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
# install basics # install basics
RUN apt-get update && \ RUN apt-get update && \
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \
curl \ curl \
gpg \ gpg \
ca-certificates \ ca-certificates \
moreutils \ moreutils \
locales \ locales \
apt-transport-https \ apt-transport-https \
python3 && \ dumb-init \
rm -rf /var/cache/apt /var/lib/apt/lists python3 && \
rm -rf /var/cache/apt /var/lib/apt/lists
# If you have active Kopano subscription you can change KOPANO_WEBAPP_REPOSITORY_URL to
# https://serial:<YOURSERIAL>@download.kopano.io/supported/webapp:/final/Debian_9.0 # If you have active Kopano subscription you can change KOPANO_WEBAPP_REPOSITORY_URL to
# and replace <YOURSERIAL> with your serial. You can also use pre-final or any other repository branch. # https://serial:<YOURSERIAL>@download.kopano.io/supported/webapp:/final/Debian_9.0
# docker build --build-arg KOPANO_WEBAPP_REPOSITORY_URL=https://serial:<YOURSERIAL>@download.kopano.io/supported/webapp:/final/Debian_9.0 https://github.com/zokradonh/kopano-docker.git#:webapp # and replace <YOURSERIAL> with your serial. You can also use pre-final or any other repository branch.
# Do the same with KOPANO_CORE_REPOSITORY as webapp needs some packages from core. # docker build --build-arg KOPANO_WEBAPP_REPOSITORY_URL=https://serial:<YOURSERIAL>@download.kopano.io/supported/webapp:/final/Debian_9.0 https://github.com/zokradonh/kopano-docker.git#:webapp
# If you want to use community version please use images from hub.docker.com. # Do the same with KOPANO_CORE_REPOSITORY as webapp needs some packages from core.
# Changing KOPANO_WEBAPP_VERSION does not really change the resulting image. # If you want to use community version please use images from hub.docker.com.
ARG KOPANO_WEBAPP_VERSION=newest # Changing KOPANO_WEBAPP_VERSION does not really change the resulting image.
ARG KOPANO_REPOSITORY_BRANCH=master ARG KOPANO_WEBAPP_VERSION=newest
ARG KOPANO_WEBAPP_REPOSITORY_URL="http://buildproxy/supported/webapp:/${KOPANO_REPOSITORY_BRANCH}/Debian_9.0" ARG KOPANO_REPOSITORY_BRANCH=master
ARG KOPANO_CORE_REPOSITORY_URL="http://buildproxy/supported/core:/${KOPANO_REPOSITORY_BRANCH}/Debian_9.0" ARG KOPANO_WEBAPP_REPOSITORY_URL="http://buildproxy/supported/webapp:/${KOPANO_REPOSITORY_BRANCH}/Debian_9.0"
ARG KOPANO_REPOSITORY_FLAGS="trusted=yes" ARG KOPANO_CORE_REPOSITORY_URL="http://buildproxy/supported/core:/${KOPANO_REPOSITORY_BRANCH}/Debian_9.0"
ARG NO_RELEASE_KEY_DOWNLOAD=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 && \ # install kopano web app and refresh ca-certificates
echo "deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /" > /etc/apt/sources.list.d/zpush.list && \ RUN echo ${KOPANO_WEBAPP_VERSION} > /kopano/buildversion && \
echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_WEBAPP_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano-webapp.list && \ 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_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano-core.list; \ echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_WEBAPP_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano-webapp.list && \
(exit ${NO_RELEASE_KEY_DOWNLOAD}) && curl -s -S -o - "${KOPANO_WEBAPP_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 -; \ (exit ${NO_RELEASE_KEY_DOWNLOAD}) && curl -s -S -o - "${KOPANO_WEBAPP_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 - && \ (exit ${NO_RELEASE_KEY_DOWNLOAD}) && curl -s -S -o - "${KOPANO_CORE_REPOSITORY_URL}/Release.key" | apt-key add -; \
apt-get update && apt-get install -y --no-install-recommends \ curl -s -S -o - "http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key" | apt-key add - && \
apache2 \ apt-get update && apt-get install -y --no-install-recommends \
libapache2-mod-php7.0 \ apache2 \
crudini \ libapache2-mod-php7.0 \
z-push-backend-kopano \ crudini \
z-push-config-apache \ z-push-backend-kopano \
z-push-ipc-sharedmemory \ z-push-config-apache \
ca-certificates \ z-push-ipc-sharedmemory \
kopano-webapp \ ca-certificates \
kopano-webapp-plugin-contactfax \ kopano-webapp \
kopano-webapp-plugin-desktopnotifications \ kopano-webapp-plugin-contactfax \
kopano-webapp-plugin-filepreviewer \ kopano-webapp-plugin-desktopnotifications \
kopano-webapp-plugin-folderwidgets \ kopano-webapp-plugin-filepreviewer \
kopano-webapp-plugin-gmaps \ kopano-webapp-plugin-folderwidgets \
kopano-webapp-plugin-intranet \ kopano-webapp-plugin-gmaps \
kopano-webapp-plugin-mattermost \ kopano-webapp-plugin-intranet \
kopano-webapp-plugin-pimfolder \ kopano-webapp-plugin-mattermost \
kopano-webapp-plugin-quickitems \ kopano-webapp-plugin-pimfolder \
kopano-webapp-plugin-spell-de-at \ 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-at \
kopano-webapp-plugin-spell-de-de \ 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-de-de \
kopano-webapp-plugin-spell-en \ 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-en \
kopano-webapp-plugin-spell-es \ kopano-webapp-plugin-spell-es \
kopano-webapp-plugin-spell-fr \ kopano-webapp-plugin-spell-es \
kopano-webapp-plugin-spell-it \ kopano-webapp-plugin-spell-fr \
kopano-webapp-plugin-spell-nl \ 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-nl \
kopano-webapp-plugin-spell \ kopano-webapp-plugin-spell-pl-pl \
kopano-webapp-plugin-spell \ kopano-webapp-plugin-spell \
kopano-webapp-plugin-titlecounter \ kopano-webapp-plugin-spell \
kopano-webapp-plugin-webappmanual \ kopano-webapp-plugin-titlecounter \
kopano-webapp-plugin-zdeveloper \ kopano-webapp-plugin-webappmanual \
#threema4deskapp \ kopano-webapp-plugin-zdeveloper \
whatsapp4deskapp \ #threema4deskapp \
&& rm -rf /var/cache/apt /var/lib/apt/lists whatsapp4deskapp \
&& rm -rf /var/cache/apt /var/lib/apt/lists
COPY apache2-kopano.conf /etc/apache2/sites-available/kopano.conf
COPY apache2-kopano.conf /etc/apache2/sites-available/kopano.conf
# configure basics
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ # configure basics
sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \ sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \
update-locale LANG=en_US.UTF-8 && \ dpkg-reconfigure --frontend=noninteractive locales && \
curl -s -S -L -o /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 && \ update-locale LANG=en_US.UTF-8 && \
chmod a+x /usr/local/bin/dumb-init && \ # configure apache
# configure apache rm /etc/apache2/sites-enabled/* && \
rm /etc/apache2/sites-enabled/* && \ sed -e 's,^ErrorLog.*,ErrorLog "|/bin/cat",' -i /etc/apache2/apache2.conf && \
sed -e 's,^ErrorLog.*,ErrorLog "|/bin/cat",' -i /etc/apache2/apache2.conf && \ sed -e "s,MaxSpareServers[^:].*,MaxSpareServers 5," -i /etc/apache2/mods-available/mpm_prefork.conf && \
sed -e "s,MaxSpareServers[^:].*,MaxSpareServers 5," -i /etc/apache2/mods-available/mpm_prefork.conf && \ a2disconf other-vhosts-access-log && \
a2disconf other-vhosts-access-log && \ a2ensite kopano && \
a2ensite kopano && \ echo "Listen 80" > /etc/apache2/ports.conf && \
echo "Listen 80" > /etc/apache2/ports.conf && \ # configure mod_php
# configure mod_php a2enmod rewrite && \
a2enmod rewrite && \ crudini --set /etc/php/7.0/apache2/php.ini PHP upload_max_filesize 500M && \
crudini --set /etc/php/7.0/apache2/php.ini PHP upload_max_filesize 500M && \ crudini --set /etc/php/7.0/apache2/php.ini PHP post_max_size 500M && \
crudini --set /etc/php/7.0/apache2/php.ini PHP post_max_size 500M && \ crudini --set /etc/php/7.0/apache2/php.ini PHP max_input_vars 1800 && \
crudini --set /etc/php/7.0/apache2/php.ini PHP max_input_vars 1800 && \ crudini --set /etc/php/7.0/apache2/php.ini Session session.save_path /run/sessions && \
crudini --set /etc/php/7.0/apache2/php.ini Session session.save_path /run/sessions && \ # configure z-push
# configure z-push mkdir -p /var/lib/z-push /var/log/z-push && \
mkdir -p /var/lib/z-push /var/log/z-push && \ chown www-data:www-data /var/lib/z-push /var/log/z-push
chown www-data:www-data /var/lib/z-push /var/log/z-push
VOLUME /var/lib/z-push/
VOLUME /var/lib/z-push/
EXPOSE 80/tcp
EXPOSE 80/tcp
COPY start.sh /kopano/start.sh
COPY start.sh /kopano/start.sh
RUN chmod a+x /kopano/start.sh
RUN chmod a+x /kopano/start.sh
ENV LANG en_US.UTF-8
ENV LANG en_US.UTF-8
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
CMD [ "/kopano/start.sh" ] CMD [ "/kopano/start.sh" ]