1
0
mirror of https://github.com/zokradonh/kopano-docker.git synced 2026-08-11 16:32:59 +00:00

Make it possible to use an existing konnect instance (#195)

* make konnect url configurable
* switch to fork of dockerize as it allows to skip ssl verification
since the address of the oidc issuer is now dynamic it could point to an invalid ssl certificate (the self signed cert is by default "valid" for *)
* update hadolint
* add more scopes
* only skip ssl verification when running insecure
This commit is contained in:
Felix Bartels
2019-08-20 21:16:42 +02:00
committed by GitHub
parent ae7f679be2
commit f7934cbc51
10 changed files with 38 additions and 24 deletions
+4 -4
View File
@@ -17,10 +17,10 @@ LABEL maintainer=az@zok.xyz \
USER root
ENV DOCKERIZE_VERSION v0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
ENV DOCKERIZE_VERSION v0.11.0
RUN wget -O - https://github.com/powerman/dockerize/releases/download/"$DOCKERIZE_VERSION"/dockerize-"$(uname -s)"-"$(uname -m)" | install /dev/stdin /bin/dockerize
COPY wrapper.sh /usr/local/bin
+11 -8
View File
@@ -65,14 +65,17 @@ if [ -n "$public_guest_access_regexp" ]; then
set -- "$@" --public-guest-access-regexp="$public_guest_access_regexp"
fi
# shellcheck disable=SC2034
export registration_conf=/kopano/ssl/konnectd-identifier-registration.yaml
if [ "$INSECURE" = "yes" ]; then
dockerize \
-skip-tls-verify \
-wait "$oidc_issuer_identifier"/.well-known/openid-configuration \
-timeout 360s
else
dockerize \
-wait "$oidc_issuer_identifier"/.well-known/openid-configuration \
-timeout 360s
fi
# originally I wanted to wait for $registration_conf, but I needed to precreate the file
# so the konnect container (since the startup is running as nobody) can write to it.
exec dockerize \
-wait http://kopano_konnect:8777/.well-known/openid-configuration \
-timeout 360s \
/usr/local/bin/docker-entrypoint.sh serve \
exec /usr/local/bin/docker-entrypoint.sh serve \
--registration-conf /kopano/ssl/konnectd-identifier-registration.yaml \
"$@"