1
0
mirror of https://github.com/zokradonh/kopano-docker.git synced 2026-08-11 08:23:02 +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:
Felix Bartels
2019-03-14 07:46:54 +01:00
committed by GitHub
parent f5a24f2150
commit 91ccf89765
26 changed files with 133 additions and 79 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
ARG docker_repo=zokradonh
FROM composer:1.8.4 as composer
RUN git clone --depth 1 https://stash.kopano.io/scm/kc/kdav.git /usr/share/kdav && \
cd /usr/share/kdav && \
composer install
RUN git clone --depth 1 https://stash.kopano.io/scm/kc/kdav.git /usr/share/kdav
WORKDIR /usr/share/kdav
RUN composer install
FROM ${docker_repo}/kopano_base
+6 -4
View File
@@ -7,10 +7,11 @@ ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES:-""}
set -eu # unset variables are errors & non-zero return values exit the whole script
[ ! -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
@@ -40,6 +41,7 @@ tail --pid=$$ -F --lines=0 -q /var/log/kdav/kdav-error.log &
echo "Starting Apache"
rm -f /run/apache2/apache2.pid
set +u
# shellcheck disable=SC1091
source /etc/apache2/envvars
# cleaning up env variables
unset "${!KCCONF_@}"