mirror of
https://github.com/zokradonh/kopano-docker
synced 2025-06-07 16:06:14 +00:00
Community build now directly possible
This commit is contained in:
parent
2d2eaba1a5
commit
fe0d9438c5
@ -6,7 +6,7 @@ LABEL maintainer=az@zok.xyz \
|
|||||||
RUN mkdir -p /kopano/repo /kopano/data
|
RUN mkdir -p /kopano/repo /kopano/data
|
||||||
WORKDIR /kopano/repo
|
WORKDIR /kopano/repo
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
# install basics
|
# install basics
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
@ -17,34 +17,39 @@ RUN apt-get update && \
|
|||||||
moreutils \
|
moreutils \
|
||||||
locales \
|
locales \
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
|
apt-utils jq \
|
||||||
python3-minimal && \
|
python3-minimal && \
|
||||||
rm -rf /var/cache/apt /var/lib/apt/lists
|
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 && \
|
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||||
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 && \
|
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 && \
|
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
|
chmod a+x /usr/local/bin/dumb-init
|
||||||
|
|
||||||
# If you have active Kopano subscription you can change KOPANO_CORE_REPOSITORY_URL to
|
|
||||||
# https://serial:<YOURSERIAL>@download.kopano.io/supported/core:/final/Debian_9.0
|
|
||||||
# and replace <YOURSERIAL> with your serial. You can also use pre-final or any other repository branch.
|
|
||||||
# If you want to use community version please use images from hub.docker.com
|
|
||||||
ARG KOPANO_CORE_VERSION=newest
|
ARG KOPANO_CORE_VERSION=newest
|
||||||
ARG KOPANO_REPOSITORY_BRANCH=master
|
ARG KOPANO_REPOSITORY_BRANCH=master
|
||||||
ARG KOPANO_CORE_REPOSITORY_URL="http://buildproxy/supported/core:/${KOPANO_REPOSITORY_BRANCH}/Debian_9.0"
|
ARG KOPANO_CORE_REPOSITORY_URL="file:/kopano/repo"
|
||||||
ARG KOPANO_REPOSITORY_FLAGS="trusted=yes"
|
ARG KOPANO_REPOSITORY_FLAGS="trusted=yes"
|
||||||
ARG NO_RELEASE_KEY_DOWNLOAD=0
|
ARG DOWNLOAD_COMMUNITY_PACKAGES=1
|
||||||
|
ARG RELEASE_KEY_DOWNLOAD=0
|
||||||
ARG ADDITIONAL_KOPANO_PACKAGES
|
ARG ADDITIONAL_KOPANO_PACKAGES
|
||||||
|
|
||||||
# install kopano components
|
# community build
|
||||||
RUN set -x && \
|
COPY download_community.sh /kopano/download_community.sh
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
# community download
|
||||||
|
[ ${DOWNLOAD_COMMUNITY_PACKAGES} -eq 1 ] && \
|
||||||
|
chmod a+x /kopano/download_community.sh && \
|
||||||
|
/kopano/download_community.sh core && \
|
||||||
|
gzip -f9 Packages; \
|
||||||
|
# install
|
||||||
|
set -x && \
|
||||||
echo ${KOPANO_CORE_VERSION} > /kopano/buildversion && \
|
echo ${KOPANO_CORE_VERSION} > /kopano/buildversion && \
|
||||||
echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano-core.list; \
|
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 -; \
|
[ ${RELEASE_KEY_DOWNLOAD} -eq 1 ] && curl -s -S -o - "${KOPANO_CORE_REPOSITORY_URL}/Release.key" | apt-key add -; \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install --no-install-recommends -y \
|
apt-get install --no-install-recommends -y \
|
||||||
kopano-server-packages="${KOPANO_CORE_VERSION}" \
|
kopano-server-packages="${KOPANO_CORE_VERSION}" \
|
||||||
|
@ -15,8 +15,22 @@ The docker image kopano_ssl will create certificates for all containers. Those c
|
|||||||
|
|
||||||
kopano_webapp port 80 is meant to be published through a https reverse proxy. MAPI connection for Outlook is also handled over port 80.
|
kopano_webapp port 80 is meant to be published through a https reverse proxy. MAPI connection for Outlook is also handled over port 80.
|
||||||
|
|
||||||
Maybe you need to execute `kopano-cli --list-users` once after initial install in the kopano_server container
|
Maybe you need to execute `kopano-cli --list-users` once after initial install in the kopano_server container.
|
||||||
see https://documentation.kopano.io/kopanocore_administrator_manual/configure_kc_components.html#testing-ldap-configuration
|
|
||||||
|
See: https://documentation.kopano.io/kopanocore_administrator_manual/configure_kc_components.html#testing-ldap-configuration
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
`docker-compose exec kserver kopano-cli --list-users` (This may last very long without any console output.)
|
|
||||||
|
`docker-compose exec kserver kopano-cli --list-users` (This may last very long without any console output.)
|
||||||
|
|
||||||
|
|
||||||
|
Building supported Kopano
|
||||||
|
=====
|
||||||
|
If you have an active Kopano subscription you need specify the following build time arguments:
|
||||||
|
- KOPANO_CORE_REPOSITORY_URL to `https://serial:<YOURSERIAL>@download.kopano.io/supported/core:/final/Debian_9.0`
|
||||||
|
- RELEASE_KEY_DOWNLOAD to 1
|
||||||
|
- DOWNLOAD_COMMUNITY_PACKAGES to 0
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
`docker build --build-arg KOPANO_CORE_REPOSITORY_URL=https://serial:ABC123456789@download.kopano.io/supported/core:/final/Debian_9.0 --build-arg RELEASE_KEY_DOWNLOAD=1 --build-arg DOWNLOAD_COMMUNITY_PACKAGES=0 https://github.com/zokradonh/kopano-docker.git#:core`
|
23
core/download_community.sh
Normal file
23
core/download_community.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
||||||
|
|
||||||
|
# query community server by h5ai API
|
||||||
|
filename=$(curl -s -S -L -d "action=get&items%5Bhref%5D=%2Fcommunity%2F$1%3A%2F&items%5Bwhat%5D=1" -H \
|
||||||
|
"Accept: application/json" https://download.kopano.io/community/ | jq '.items[].href' | \
|
||||||
|
grep Debian_9.0-amd64 | sed 's#"##g' | sed "s#/community/$1:/##")
|
||||||
|
|
||||||
|
filename=$(urldecode $filename)
|
||||||
|
|
||||||
|
# download & extract packages
|
||||||
|
curl -s -S -L -o $filename https://download.kopano.io/community/$1:/${filename}
|
||||||
|
|
||||||
|
tar xf $filename
|
||||||
|
|
||||||
|
# save disk space
|
||||||
|
rm $filename
|
||||||
|
|
||||||
|
# prepare directory to be apt source
|
||||||
|
apt-ftparchive packages ${filename%.tar.gz} >> Packages
|
||||||
|
|
@ -13,8 +13,9 @@ mkdir -p /kopano/data/attachments /tmp/$SERVICE_TO_START /var/run/kopano
|
|||||||
echo "Configure core service '$SERVICE_TO_START'" | ts
|
echo "Configure core service '$SERVICE_TO_START'" | ts
|
||||||
/usr/bin/python3 /kopano/$SERVICE_TO_START.py
|
/usr/bin/python3 /kopano/$SERVICE_TO_START.py
|
||||||
|
|
||||||
echo "Set config ownership" | ts
|
echo "Set ownership" | ts
|
||||||
chown -R kopano:kopano /kopano/data /run /tmp
|
chown -R kopano:kopano /run /tmp
|
||||||
|
chown kopano:kopano /kopano/data/ /kopano/data/attachments
|
||||||
|
|
||||||
echo "Clean old pid files and sockets" | ts
|
echo "Clean old pid files and sockets" | ts
|
||||||
rm -f /var/run/kopano/*
|
rm -f /var/run/kopano/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user