mirror of
https://github.com/zokradonh/kopano-docker
synced 2025-06-07 07:56:12 +00:00
Fix build for official and supported releases (#15)
* Fix build for official and supported releases * Fix config generation: skip missing config files * kopano-search ignores KOPANO_CONFIG_PATH env var * Use kopano core 8.7 by default * Include APT release key in this repo * Copy APT release key into image
This commit is contained in:
parent
1120a8e08b
commit
4effa19d91
@ -99,7 +99,7 @@ COMPOSE_FILE=docker-compose.yml:docker-compose.ports.yml:docker-compose.db.yml:d
|
||||
|
||||
# Modify below to build a different version, than the Kopano nightly release
|
||||
# credentials for repositories are handled through a file called apt_auth.conf (which will be created through setup.sh or Makefile)
|
||||
#KOPANO_CORE_REPOSITORY_URL=https://download.kopano.io/supported/core:/9.x/Debian_10/
|
||||
#KOPANO_CORE_REPOSITORY_URL=https://download.kopano.io/supported/core:/8.7/Debian_10/
|
||||
#KOPANO_MEET_REPOSITORY_URL=https://download.kopano.io/supported/meet:/final/Debian_10/
|
||||
#KOPANO_WEBAPP_REPOSITORY_URL=https://download.kopano.io/supported/webapp:/final/Debian_10/
|
||||
#KOPANO_WEBAPP_FILES_REPOSITORY_URL=https://download.kopano.io/supported/files:/final/Debian_10/
|
||||
|
@ -44,11 +44,7 @@ RUN apt-get update && \
|
||||
moreutils \
|
||||
python3-minimal \
|
||||
&& \
|
||||
rm -rf /var/cache/apt /var/lib/apt/lists/*; \
|
||||
# install apt key if supported kopano
|
||||
if [ ${RELEASE_KEY_DOWNLOAD} -eq 1 ]; then \
|
||||
curl -s -S -o - "${KOPANO_CORE_REPOSITORY_URL}/Release.key" | apt-key add -; \
|
||||
fi
|
||||
rm -rf /var/cache/apt /var/lib/apt/lists/*
|
||||
|
||||
# Create kopano user and group
|
||||
RUN groupadd --system --gid ${KOPANO_GID} kopano
|
||||
@ -73,7 +69,8 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||
|
||||
# get common utilities
|
||||
COPY create-kopano-repo.sh /kopano/helper/
|
||||
COPY kcconf.py defaultconfigs/ /kopano/
|
||||
COPY kcconf.py Release.key defaultconfigs/ /kopano/
|
||||
RUN apt-key add /kopano/Release.key
|
||||
|
||||
SHELL [ "/bin/bash", "-c"]
|
||||
|
||||
|
51
base/Release.key
Normal file
51
base/Release.key
Normal file
@ -0,0 +1,51 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBFcjak8BEACl/9+3+hgGmkIgn/G8dzfo4BY8gRtLdQkFPw/dhvZWGznvFkdY
|
||||
GbSdIbcFNp8uMKva8P75rIq5XSYAU8o21gjoGuVSi55MB/JNnR22whpXHnx3Os2i
|
||||
pkoFZEWqGoW/7CWAk6QVOpVK+0UXEaXTkuEKVsB+hRL9wRQNpcWN8M894/I5egGB
|
||||
b1gPD9OFMTlHEVjLYFLUwGeMCSpcTU4kHu93g7S/s2xVng31xlZ2FqUgUT2GWTrR
|
||||
YfPuNib0srIZXwsqmVMJdu4qx3FoIJeAd3KH11fbb2oZEmwGKYfULoATGQ6s9/nG
|
||||
wVR2aJPPgZJv2YIpoE4CqKixj8ll6yc6DWzp2dOOj/4JJvpdpeO3Vu3dMy+8qBsR
|
||||
VlsCRKAFJLkmnliaUxtGM3oH3URb8LSnLXWPrvDB3sEq4o5mRxooqcwzi5FQ8bvG
|
||||
jzoqdw4NWIuH24Y7cC80X7o28qmN+DxySkeOtMQ9hVxYhK+bab3kw9Q9KCIT70r6
|
||||
YsCPX2+5RSBDpWI4bmP/3xMD2EUsdZBZYx79Qccai9+Syhw+GgIC/Yj9tdK8++5D
|
||||
XJWxTZLhYBAfoI3RsOmx38Yg9Z8fFF2l43jgveFORrv0EMcWBrJTtvLEXBPdCjBi
|
||||
AYBhAsuku/Kc6/zXrbWOYnmtxiYqjiqsyOXFdXat9Vw163rup2UoGjw8sQARAQAB
|
||||
tCpLb3Bhbm8gRGV2ZWxvcG1lbnQgPGRldmVsb3BtZW50QGtvcGFuby5pbz6JAj8E
|
||||
EwECACkFAlc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gRtUWMEXSo0jeE1/rz7b
|
||||
uHIg2U703IH+wNrvzP23OTMWbHI3seqZ6P70ujfMle9bBmiqUCTiTTVODb3YJ2o1
|
||||
jCfSFXIcBliRRrmPPaEs1vg/TGXGCoSSoFOzeyYA2FJJ2NcSacE/lxY1gRmwY0AB
|
||||
ED0D3Bnq0wo0RvYowrK8rZdrkTBmxV7ni2JglQhKyEy41/YL3MTx9/MMTJDujEJ6
|
||||
7zUlfHQRsIWNhNJyXwU/2pk8F6DY5g==
|
||||
=PzW0
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
@ -10,7 +10,7 @@ def configkopano(configs):
|
||||
""" Changes configuration files according to configs typically returned from parseenvironmentvariables(..)"""
|
||||
for filename, config in configs.items():
|
||||
if not os.path.exists(filename):
|
||||
return
|
||||
continue
|
||||
# read configuration file
|
||||
with open(filename) as f:
|
||||
contents = f.read()
|
||||
|
@ -42,7 +42,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# install Kopano Core and refresh ca-certificates
|
||||
# hadolint currently does not understand the extended buildkit syntax https://github.com/hadolint/hadolint/issues/347
|
||||
# hadolint ignore=SC2215,DL3015
|
||||
RUN --mount=type=secret,id=repocred,dst=/etc/apt/apt_auth.conf \
|
||||
RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \
|
||||
# apt key for this repo has already been installed in base
|
||||
echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano.list; \
|
||||
# install
|
||||
|
@ -241,7 +241,7 @@ search)
|
||||
if dpkg --compare-versions "$searchversion" "gt" "8.7.82.165"; then
|
||||
exec "$EXE" --config /tmp/kopano/search.cfg
|
||||
else
|
||||
exec /usr/bin/python3 "$EXE" -F
|
||||
exec /usr/bin/python3 "$EXE" --config /tmp/kopano/search.cfg -F
|
||||
fi
|
||||
;;
|
||||
spooler)
|
||||
|
@ -33,7 +33,7 @@ LABEL maintainer=az@zok.xyz \
|
||||
|
||||
# install Kopano kDAV
|
||||
# hadolint ignore=SC2215
|
||||
RUN --mount=type=secret,id=repocred,dst=/etc/apt/apt_auth.conf \
|
||||
RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \
|
||||
# apt key for this repo has already been installed in base
|
||||
echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano.list; \
|
||||
set -x && \
|
||||
|
@ -33,7 +33,7 @@ LABEL maintainer=az@zok.xyz \
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# hadolint ignore=SC2215
|
||||
RUN --mount=type=secret,id=repocred,dst=/etc/apt/apt_auth.conf \
|
||||
RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \
|
||||
# apt key for this repo has already been installed in base
|
||||
# community download and package as apt source repository
|
||||
. /kopano/helper/create-kopano-repo.sh && \
|
||||
|
@ -30,7 +30,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# add install common php dependencies
|
||||
# hadolint ignore=SC2215
|
||||
RUN --mount=type=secret,id=repocred,dst=/etc/apt/apt_auth.conf \
|
||||
RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \
|
||||
# apt key for this repo has already been installed in base
|
||||
echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano.list; \
|
||||
# install
|
||||
|
@ -29,7 +29,7 @@ LABEL maintainer=az@zok.xyz \
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# hadolint ignore=SC2215
|
||||
RUN --mount=type=secret,id=repocred,dst=/etc/apt/apt_auth.conf \
|
||||
RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \
|
||||
echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano.list; \
|
||||
# install
|
||||
set -x && \
|
||||
|
6
setup.sh
6
setup.sh
@ -45,9 +45,9 @@ for dockerenv in ldap password-self-service mail db kopano_ssl kopano_server kop
|
||||
touch ./"$dockerenv".env
|
||||
done
|
||||
|
||||
if ! grep -q download.kopano.com ./apt_auth.conf 2&> /dev/null; then
|
||||
if ! grep -q download.kopano.io ./apt_auth.conf 2&> /dev/null; then
|
||||
echo "Adding example entry to local apt_auth.conf"
|
||||
echo "machine download.kopano.com login serial REPLACE-ME" >> ./apt_auth.conf
|
||||
echo "machine download.kopano.io login serial password REPLACE-ME" >> ./apt_auth.conf
|
||||
fi
|
||||
|
||||
if [ ! -e ./.env ]; then
|
||||
@ -341,7 +341,7 @@ COMPOSE_FILE=docker-compose.yml:docker-compose.ports.yml:docker-compose.db.yml:d
|
||||
|
||||
# Modify below to build a different version, than the Kopano nightly release
|
||||
# credentials for repositories are handled through a file called apt_auth.conf (which will be created through setup.sh or Makefile)
|
||||
#KOPANO_CORE_REPOSITORY_URL=https://download.kopano.io/supported/core:/9.x/Debian_10/
|
||||
#KOPANO_CORE_REPOSITORY_URL=https://download.kopano.io/supported/core:/8.7/Debian_10/
|
||||
#KOPANO_MEET_REPOSITORY_URL=https://download.kopano.io/supported/meet:/final/Debian_10/
|
||||
#KOPANO_WEBAPP_REPOSITORY_URL=https://download.kopano.io/supported/webapp:/final/Debian_10/
|
||||
#KOPANO_WEBAPP_FILES_REPOSITORY_URL=https://download.kopano.io/supported/files:/final/Debian_10/
|
||||
|
@ -11,7 +11,7 @@ LABEL maintainer=az@zok.xyz \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
# hadolint ignore=SC2215
|
||||
RUN --mount=type=secret,id=repocred,dst=/etc/apt/apt_auth.conf \
|
||||
RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \
|
||||
apt-get update && apt-get install --no-install-recommends -y \
|
||||
git \
|
||||
iputils-ping \
|
||||
|
@ -43,7 +43,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# install Kopano WebApp
|
||||
# hadolint ignore=SC2129,SC2215
|
||||
RUN --mount=type=secret,id=repocred,dst=/etc/apt/apt_auth.conf \
|
||||
RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \
|
||||
# community download and package as apt source repository
|
||||
# TODO is it neccesary to source this file here? was already sourced before
|
||||
. /kopano/helper/create-kopano-repo.sh && \
|
||||
|
@ -36,7 +36,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# install Z-Push
|
||||
# TODO secret handling could go away when kopano_php is used as a base image
|
||||
# hadolint ignore=SC2215
|
||||
RUN --mount=type=secret,id=repocred,dst=/etc/apt/apt_auth.conf \
|
||||
RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \
|
||||
echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano.list; \
|
||||
# prepare z-push installation
|
||||
echo "deb ${KOPANO_ZPUSH_REPOSITORY_URL} /" > /etc/apt/sources.list.d/zpush.list && \
|
||||
|
Loading…
x
Reference in New Issue
Block a user