mirror of
https://github.com/zokradonh/kopano-docker.git
synced 2026-08-21 05:13:22 +00:00
make it possible to install additional packages at runtime and not only during build
Signed-off-by: Felix Bartels <felix@host-consultants.de>
This commit is contained in:
+9
-1
@@ -1,11 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# define default value for serverhostname and serverport of not passed into container
|
||||
# define default value for serverhostname and serverport if not passed into container
|
||||
KCCONF_SERVERHOSTNAME=${KCCONF_SERVERHOSTNAME:-127.0.0.1}
|
||||
KCCONF_SERVERPORT=${KCCONF_SERVERPORT:-237}
|
||||
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;
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Ensure directories"
|
||||
mkdir -p /run/sessions /tmp/webapp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user