mirror of
https://github.com/zokradonh/kopano-docker.git
synced 2026-08-11 16:32:59 +00:00
add linting for shell scripts and Dockerfiles
* add hadolint for dockerfile linting * add hadofile config * add checks for dockerfiles and shellcheck into makefile * shellcheck fixes * add workaround so that .env can be sourced again from version.sh * hadolint fixes * print progress of build/run.sh * fix check for jq in setup.sh relates to #41 and #26
This commit is contained in:
+2
-3
@@ -10,10 +10,9 @@ ENV PKI_ROOT /kopano/easypki
|
||||
ENV PKI_ORGANIZATION Internal Kopano System
|
||||
ENV PKI_COUNTRY DE
|
||||
|
||||
RUN apk add --update \
|
||||
RUN apk add --no-cache \
|
||||
easypki \
|
||||
openssl \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
openssl
|
||||
|
||||
COPY start.sh /start.sh
|
||||
|
||||
|
||||
+2
-3
@@ -3,7 +3,6 @@
|
||||
mkdir -p /kopano/ssl/clients/
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# clean out any potential port numbers
|
||||
FQDN=${FQDN%:*}
|
||||
@@ -19,7 +18,7 @@ if [ ! -f /kopano/ssl/ca.pem ]; then
|
||||
for s in kopano_server kopano_dagent kopano_monitor kopano_search kopano_spooler kopano_webapp; do
|
||||
if [ ! -f /kopano/ssl/$s.pem ]; then
|
||||
echo "Creating $s certificate..."
|
||||
easypki create --ca-name internalca --organizational-unit $s --expire 3650 --dns $s --dns $FQDN $s
|
||||
easypki create --ca-name internalca --organizational-unit $s --expire 3650 --dns $s --dns "$FQDN" $s
|
||||
cp /kopano/easypki/internalca/keys/$s.key /kopano/ssl/$s.pem.tmp
|
||||
cat /kopano/easypki/internalca/certs/$s.crt >> /kopano/ssl/$s.pem.tmp
|
||||
openssl x509 -in /kopano/easypki/internalca/certs/$s.crt -pubkey -noout > /kopano/ssl/clients/$s-public.pem.tmp
|
||||
@@ -41,7 +40,7 @@ fi
|
||||
signkey="/kopano/ssl/konnectd-tokens-signing-key.pem"
|
||||
if [ ! -f $signkey ]; then
|
||||
echo "Creating Konnect token signing key..."
|
||||
openssl genpkey -algorithm RSA -out $signkey.tmp -pkeyopt rsa_keygen_bits:4096 2&> /dev/null
|
||||
openssl genpkey -algorithm RSA -out $signkey.tmp -pkeyopt rsa_keygen_bits:4096 >/dev/null 2>&1
|
||||
chmod go+r $signkey.tmp
|
||||
mv $signkey.tmp $signkey
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user