FROM php:7.2-fpm-alpine LABEL maintainer="markus@martialblog.de" ARG version='4.3.22+201019' ARG sha256_checksum='62609e8d3297639d33361a7af627dc3e3ec91e6c237bc2033c6c734e11b315eb' # 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 && \ apk add --no-cache netcat-openbsd bash # 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 \ exif \ gd \ imap \ ldap \ mbstring \ pdo \ pdo_mysql \ pdo_pgsql \ pgsql \ zip # Download, unzip and chmod of LimeSurvey RUN curl -sSL "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" --output /tmp/limesurvey.tar.gz RUN set -ex; \ echo "${sha256_checksum} /tmp/limesurvey.tar.gz" | sha256sum -c - && \ \ tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \ \ rm -rf "/tmp/limesurvey.tar.gz" \ /var/www/html/docs \ /var/www/html/tests \ /var/www/html/*.md && \ chown -R www-data:root /var/www/ ; \ chmod -R g=u /var/www EXPOSE 9000 COPY entrypoint.sh entrypoint.sh ENTRYPOINT ["/var/www/html/entrypoint.sh"] CMD ["php-fpm"]