mirror of
https://github.com/zokradonh/kopano-docker.git
synced 2026-08-11 16:32:59 +00:00
Subdir renaming (removed prefix)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
FROM alpine:latest
|
||||
|
||||
LABEL maintainer=az@zok.xyz \
|
||||
version="1.0"
|
||||
|
||||
RUN mkdir -p /kopano/easypki /kopano/ssl /kopano/ssl/clients
|
||||
WORKDIR /kopano/easypki
|
||||
|
||||
ENV PKI_ROOT /kopano/easypki
|
||||
ENV PKI_ORGANIZATION Internal Kopano System
|
||||
ENV PKI_COUNTRY DE
|
||||
|
||||
RUN apk add --update \
|
||||
easypki \
|
||||
openssl \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
|
||||
COPY start.sh /start.sh
|
||||
COPY gencerts.sh /gencerts.sh
|
||||
|
||||
RUN chmod a+x /start.sh /gencerts.sh
|
||||
|
||||
CMD ["/start.sh"]
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Creating CA and Server certificates..."
|
||||
|
||||
easypki create --filename internalca --organizational-unit primary --expire 3650 --ca "Internal Kopano System"
|
||||
|
||||
cp /kopano/easypki/internalca/certs/internalca.crt /kopano/ssl/ca.pem
|
||||
|
||||
for s in kserver kdagent kmonitor ksearch kspooler kwebapp
|
||||
do
|
||||
easypki create --ca-name internalca --organizational-unit $s --expire 3650 $s
|
||||
cp /kopano/easypki/internalca/keys/$s.key /kopano/ssl/$s.pem
|
||||
cat /kopano/easypki/internalca/certs/$s.crt >> /kopano/ssl/$s.pem
|
||||
openssl x509 -in /kopano/easypki/internalca/certs/$s.crt -pubkey -noout > /kopano/ssl/clients/$s-public.pem
|
||||
done
|
||||
|
||||
ls -l /kopano/ssl/*.pem
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
if [ -f /kopano/ssl/ca.pem ]
|
||||
then exit 0
|
||||
fi
|
||||
|
||||
/gencerts.sh
|
||||
Reference in New Issue
Block a user