diff --git a/Dockerfile b/Dockerfile index c6f13cf6..53a011ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,10 @@ FROM php:7.0-apache ENV BOOKSTACK=BookStack \ BOOKSTACK_VERSION=0.12.1 -RUN apt-get update && apt-get install -y git zlib1g-dev libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev wget \ +RUN apt-get update && apt-get install -y git zlib1g-dev libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev wget libldap2-dev \ && docker-php-ext-install pdo pdo_mysql mbstring zip \ + && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-install ldap \ && docker-php-ext-configure gd --with-freetype-dir=usr/include/ --with-jpeg-dir=/usr/include/ \ && docker-php-ext-install gd \ && cd /var/www && curl -sS https://getcomposer.org/installer | php \ diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index b84f433f..6b5fefeb 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -8,11 +8,16 @@ if [ ! -f '/var/www/BookStack/.env' ]; then cat > /var/www/BookStack/.env < /dev/tcp/${DB_HOST}/3306) >/dev/null 2>&1; +while ! (echo > /dev/tcp/${DB_HOST}/${DB_PORT}) >/dev/null 2>&1; do sleep 1; done; EOT @@ -73,7 +97,7 @@ if [ $RESULT -eq 0 ]; then sleep 1 echoerr wait-for-db: done else - echoerr wait-for-db: timeout out after 15 seconds waiting for ${DB_HOST}:3306 + echoerr wait-for-db: timeout out after 15 seconds waiting for ${DB_HOST}:${DB_PORT} fi cd /var/www/BookStack/ && php artisan key:generate && php artisan migrate --force