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:
@@ -16,6 +16,8 @@ ENV KOPANO_REPOSITORY_FLAGS=$KOPANO_REPOSITORY_FLAGS
|
||||
ARG RELEASE_KEY_DOWNLOAD=0
|
||||
ENV RELEASE_KEY_DOWNLOAD=$RELEASE_KEY_DOWNLOAD
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# install Kopano Core and refresh ca-certificates
|
||||
RUN \
|
||||
# community download and package as apt source repository
|
||||
|
||||
@@ -9,10 +9,11 @@ if [ ! -e /kopano/"$SERVICE_TO_START".py ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ ! -z "$ADDITIONAL_KOPANO_PACKAGES" ] && apt update
|
||||
[ ! -z "$ADDITIONAL_KOPANO_PACKAGES" ] && for installpkg in $ADDITIONAL_KOPANO_PACKAGES; do
|
||||
if [ $(dpkg-query -W -f='${Status}' "$installpkg" 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||
apt --assume-yes install "$installpkg";
|
||||
[ -n "${ADDITIONAL_KOPANO_PACKAGES// }" ] && apt update
|
||||
[ -n "${ADDITIONAL_KOPANO_PACKAGES// }" ] && for installpkg in $ADDITIONAL_KOPANO_PACKAGES; do
|
||||
# shellcheck disable=SC2016 disable=SC2086
|
||||
if [ "$(dpkg-query -W -f='${Status}' $installpkg 2>/dev/null | grep -c 'ok installed')" -eq 0 ]; then
|
||||
apt --assume-yes install "$installpkg"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -88,6 +89,7 @@ kapid)
|
||||
-timeout 360s
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
sed -i s/\ *=\ */=/g /etc/kopano/kapid.cfg
|
||||
# shellcheck disable=SC2046
|
||||
export $(grep -v '^#' /etc/kopano/kapid.cfg | xargs -d '\n')
|
||||
kopano-kapid setup
|
||||
# cleaning up env variables
|
||||
|
||||
Reference in New Issue
Block a user