FROM debian:stretch LABEL maintainer=az@zok.xyz \ version="1.2" RUN mkdir -p /kopano/repo && mkdir -p /kopano/data WORKDIR /kopano/repo ENV DEBIAN_FRONTEND noninteractive # install basics RUN apt-get update && \ apt-get install --no-install-recommends -y \ curl \ gpg \ ca-certificates \ moreutils \ locales \ apt-transport-https \ python3 && \ rm -rf /var/cache/apt /var/lib/apt/lists RUN curl -s -S -L -o /usr/local/bin/confix https://raw.githubusercontent.com/budhash/confix/master/confix && \ chmod +x /usr/local/bin/confix && \ 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 && \ 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 # If you have active Kopano subscription you can provide your own details via build args. # If you want to use community version, use images from hub.docker.com or built your own # kopano package host via kopano_version_watch project in order to use nightly builds. ARG KOPANO_CORE_VERSION=newest ARG KOPANO_REPOSITORY_BRANCH=master ARG KOPANO_USER=serial ARG KOPANO_SERIAL ARG KOPANO_REPOSITORY_URL="https://${KOPANO_USER}:${KOPANO_SERIAL}@download.kopano.io/supported/core:/${KOPANO_REPOSITORY_BRANCH}/Debian_9.0" ARG KOPANO_REPOSITORY_FLAGS="trusted=yes" # install kopano components RUN set -x && \ echo ${KOPANO_CORE_VERSION} > /kopano/buildversion && \ echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano-core.list && \ curl -s -S -o - "${KOPANO_REPOSITORY_URL}/Release.key" | apt-key add - && \ apt-get update && \ apt-get install --no-install-recommends -y \ kopano-server-packages="${KOPANO_CORE_VERSION}" \ php7.0-cli && \ rm -rf /var/cache/apt /var/lib/apt/lists && \ cp /usr/share/doc/kopano/example-config/*.cfg /etc/kopano/ && \ cp /usr/share/doc/kopano/example-config/*.cfg.gz /etc/kopano/ && \ gzip -d -f /etc/kopano/*.gz ENV KOPANO_LOCALE="de_DE.UTF-8" ENV KOPANO_USERSCRIPT_LOCALE="de_DE.UTF-8" ENV LANG en_US.UTF-8 ADD kcconf.py /kopano/kcconf.py ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]