From 2fdc20f862bbe51d0bdb05cf71c57e0b866346ec Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Wed, 14 Aug 2019 18:33:44 +0200 Subject: [PATCH 1/2] Add gd config and dependencies --- apache/Dockerfile | 3 +++ fpm-alpine/Dockerfile | 3 +++ fpm/Dockerfile | 3 +++ 3 files changed, 9 insertions(+) diff --git a/apache/Dockerfile b/apache/Dockerfile index 2ad1241..d9c19b0 100644 --- a/apache/Dockerfile +++ b/apache/Dockerfile @@ -10,6 +10,8 @@ RUN set -ex; \ apt-get install --no-install-recommends -y \ \ libldap2-dev \ + libfreetype6-dev \ + libjpeg-dev \ zlib1g-dev \ libc-client-dev \ libkrb5-dev \ @@ -26,6 +28,7 @@ RUN set -ex; \ # Install PHP Plugins and Configure PHP imap plugin RUN set -ex; \ + docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \ docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \ docker-php-ext-install -j5 \ gd \ diff --git a/fpm-alpine/Dockerfile b/fpm-alpine/Dockerfile index 8a9e4dd..78e9d56 100644 --- a/fpm-alpine/Dockerfile +++ b/fpm-alpine/Dockerfile @@ -6,7 +6,9 @@ ARG sha256_checksum='1bed7812431d3fb268821dd9a40a8d9b2924f06f7b16e5f02a6cc2162c7 # Install OS dependencies RUN set -ex; \ apk add --no-cache --virtual .build-deps \ + freetype-dev \ libpng-dev \ + libjpeg-turbo-dev \ openldap-dev \ imap-dev \ postgresql-dev && \ @@ -14,6 +16,7 @@ RUN set -ex; \ # Install PHP Plugins RUN set -ex; \ + docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr ; \ docker-php-ext-configure imap --with-imap-ssl && \ docker-php-ext-install \ gd \ diff --git a/fpm/Dockerfile b/fpm/Dockerfile index a8db454..bf4636c 100644 --- a/fpm/Dockerfile +++ b/fpm/Dockerfile @@ -10,6 +10,8 @@ RUN set -ex; \ apt-get install --no-install-recommends -y \ \ libldap2-dev \ + libfreetype6-dev \ + libjpeg-dev \ zlib1g-dev \ libc-client-dev \ libkrb5-dev \ @@ -26,6 +28,7 @@ RUN set -ex; \ # Install PHP Plugins and Configure PHP imap plugin RUN set -ex; \ + docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \ docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \ docker-php-ext-install -j5 \ gd \ From 051a22eb41b2041fa03ff13f338b8bf2e436b3ec Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Thu, 15 Aug 2019 13:57:18 +0200 Subject: [PATCH 2/2] Change example volume path in docker-compose files - The previous setting did override the default Limesurvey directories - Also added a hint to the README --- README.md | 4 +++- docker-compose.fpm.alpine.yml | 2 +- docker-compose.fpm.yml | 2 +- docker-compose.pgsql.yml | 2 +- docker-compose.yml | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 67c648e..38af1db 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ LimeSurvey requires an external database (MySQL, PostgreSQL) to run. See *docker To preserve the uploaded files assign the upload folder into a volume. See *docker-compose.yml* for example. -Path: */var/www/html/upload/* +Path: */var/www/html/upload/surveys* + +**Hint**: The mounted directory must be owned by the webserver user (e.g. www-data) # LimeSurvey Configuration diff --git a/docker-compose.fpm.alpine.yml b/docker-compose.fpm.alpine.yml index 1f64159..7a7c6e2 100644 --- a/docker-compose.fpm.alpine.yml +++ b/docker-compose.fpm.alpine.yml @@ -5,7 +5,7 @@ services: context: fpm-alpine/ dockerfile: Dockerfile volumes: - - /tmp/upload/:/var/www/html/upload/ + - /tmp/upload/surveys:/var/www/html/upload/surveys - lime:/var/www/html links: - lime-db diff --git a/docker-compose.fpm.yml b/docker-compose.fpm.yml index c3e78bc..7dded99 100644 --- a/docker-compose.fpm.yml +++ b/docker-compose.fpm.yml @@ -5,7 +5,7 @@ services: context: fpm/ dockerfile: Dockerfile volumes: - - /tmp/upload/:/var/www/html/upload/ + - /tmp/upload/surveys:/var/www/html/upload/surveys - lime:/var/www/html links: - lime-db diff --git a/docker-compose.pgsql.yml b/docker-compose.pgsql.yml index cb70c55..0ca7ad9 100644 --- a/docker-compose.pgsql.yml +++ b/docker-compose.pgsql.yml @@ -5,7 +5,7 @@ services: context: apache/ dockerfile: Dockerfile volumes: - - /tmp/upload/:/var/www/html/upload/ + - /tmp/upload/surveys:/var/www/html/upload/surveys links: - lime-db depends_on: diff --git a/docker-compose.yml b/docker-compose.yml index ee6bcf0..e606fcd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: context: apache/ dockerfile: Dockerfile volumes: - - /tmp/upload/:/var/www/html/upload/ + - /tmp/upload/surveys:/var/www/html/upload/surveys links: - lime-db depends_on: