2018-02-16 18:40:13 +01:00
|
|
|
#
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Image Setup
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# To edit the 'php-fpm' base Image, visit its repository on Github
|
|
|
|
# https://github.com/Laradock/php-fpm
|
|
|
|
#
|
|
|
|
# To change its version, see the available Tags on the Docker Hub:
|
|
|
|
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
|
|
|
#
|
|
|
|
# Note: Base Image name format {image-tag}-{php-version}
|
|
|
|
#
|
|
|
|
|
2018-07-29 06:00:13 +02:00
|
|
|
ARG LARADOCK_PHP_VERSION
|
2020-04-17 05:57:50 +02:00
|
|
|
ARG BASE_IMAGE_TAG_PREFIX=latest
|
|
|
|
FROM laradock/php-fpm:${BASE_IMAGE_TAG_PREFIX}-${LARADOCK_PHP_VERSION}
|
2018-02-16 18:40:13 +01:00
|
|
|
|
2018-03-16 10:34:47 +01:00
|
|
|
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
2018-02-16 18:40:13 +01:00
|
|
|
|
2018-07-29 06:00:13 +02:00
|
|
|
ARG LARADOCK_PHP_VERSION
|
|
|
|
|
2018-06-27 12:47:05 +02:00
|
|
|
# Set Environment Variables
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
2019-08-09 02:52:32 +02:00
|
|
|
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
|
|
|
|
|
2019-09-12 02:36:11 +02:00
|
|
|
ARG CHANGE_SOURCE=false
|
|
|
|
RUN if [ ${CHANGE_SOURCE} = true ]; then \
|
|
|
|
# Change application source from deb.debian.org to aliyun source
|
2021-08-30 07:54:03 +02:00
|
|
|
sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && \
|
|
|
|
sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && \
|
|
|
|
sed -i 's/security-cdn.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list \
|
2019-09-12 02:36:11 +02:00
|
|
|
;fi
|
|
|
|
|
2018-05-27 04:06:00 +02:00
|
|
|
# always run apt update when start and after add new source list, then clean up at end.
|
2019-02-23 09:46:46 +01:00
|
|
|
RUN set -xe; \
|
|
|
|
apt-get update -yqq && \
|
|
|
|
pecl channel-update pecl.php.net && \
|
|
|
|
apt-get install -yqq \
|
|
|
|
apt-utils \
|
2021-02-02 19:20:48 +01:00
|
|
|
gnupg2 \
|
2021-03-21 14:05:36 +01:00
|
|
|
git \
|
2019-02-23 09:46:46 +01:00
|
|
|
#
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Mandatory Software's Installation
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
|
|
|
# are installed on the base image 'laradock/php-fpm' image. If you want
|
|
|
|
# to add more Software's or remove existing one, you need to edit the
|
|
|
|
# base image (https://github.com/Laradock/php-fpm).
|
|
|
|
#
|
|
|
|
# next lines are here becase there is no auto build on dockerhub see https://github.com/laradock/laradock/pull/1903#issuecomment-463142846
|
|
|
|
libzip-dev zip unzip && \
|
2021-01-06 02:47:32 +01:00
|
|
|
if [ ${LARADOCK_PHP_VERSION} = "7.3" ] || [ ${LARADOCK_PHP_VERSION} = "7.4" ] || [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
2020-01-06 16:39:23 +01:00
|
|
|
docker-php-ext-configure zip; \
|
|
|
|
else \
|
|
|
|
docker-php-ext-configure zip --with-libzip; \
|
|
|
|
fi && \
|
2019-02-23 09:46:46 +01:00
|
|
|
# Install the zip extension
|
|
|
|
docker-php-ext-install zip && \
|
|
|
|
php -m | grep -q 'zip'
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Optional Software's Installation
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Optional Software's will only be installed if you set them to `true`
|
|
|
|
# in the `docker-compose.yml` before the build.
|
|
|
|
# Example:
|
2019-02-16 16:32:03 +01:00
|
|
|
# - INSTALL_SOAP=true
|
2018-02-16 18:40:13 +01:00
|
|
|
#
|
|
|
|
|
2020-02-11 16:56:58 +01:00
|
|
|
###########################################################################
|
|
|
|
# BZ2:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_BZ2=false
|
|
|
|
RUN if [ ${INSTALL_BZ2} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get -yqq install libbz2-dev; \
|
2020-02-11 16:56:58 +01:00
|
|
|
docker-php-ext-install bz2 \
|
|
|
|
;fi
|
|
|
|
|
2020-02-12 11:23:22 +01:00
|
|
|
###########################################################################
|
2021-04-17 10:20:05 +02:00
|
|
|
# Enchant:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_ENCHANT=false
|
|
|
|
RUN if [ ${INSTALL_ENCHANT} = true ]; then \
|
|
|
|
apt-get install -yqq libenchant-dev; \
|
|
|
|
docker-php-ext-install enchant; \
|
|
|
|
php -m | grep -oiE '^enchant$'; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
###########################################################################
|
2020-02-12 11:23:22 +01:00
|
|
|
# GMP (GNU Multiple Precision):
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_GMP=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_GMP} = true ]; then \
|
|
|
|
# Install the GMP extension
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq libgmp-dev && \
|
2020-02-12 11:23:22 +01:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
|
|
|
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \
|
|
|
|
;fi && \
|
|
|
|
docker-php-ext-install gmp \
|
|
|
|
;fi
|
|
|
|
|
2021-03-21 12:25:00 +01:00
|
|
|
###########################################################################
|
|
|
|
# GnuPG:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_GNUPG=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_GNUPG} = true ]; then \
|
|
|
|
apt-get -yq install libgpgme-dev; \
|
2021-12-20 16:48:36 +01:00
|
|
|
pecl install gnupg; \
|
2021-04-06 03:57:55 +02:00
|
|
|
docker-php-ext-enable gnupg; \
|
|
|
|
php -m | grep -q 'gnupg'; \
|
|
|
|
fi
|
2021-03-21 12:25:00 +01:00
|
|
|
|
2018-08-28 08:16:25 +02:00
|
|
|
###########################################################################
|
|
|
|
# SSH2:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_SSH2=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_SSH2} = true ]; then \
|
|
|
|
# Install the ssh2 extension
|
|
|
|
apt-get -y install libssh2-1-dev && \
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
|
|
|
pecl install -a ssh2-0.13; \
|
|
|
|
else \
|
2021-03-16 10:29:51 +01:00
|
|
|
pecl install -a ssh2-1.3.1; \
|
2018-08-28 08:16:25 +02:00
|
|
|
fi && \
|
|
|
|
docker-php-ext-enable ssh2 \
|
|
|
|
;fi
|
|
|
|
|
2018-09-18 15:44:36 +02:00
|
|
|
###########################################################################
|
|
|
|
# libfaketime:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_FAKETIME=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_FAKETIME} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq libfaketime \
|
2018-09-18 15:44:36 +02:00
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# SOAP:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_SOAP=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
|
|
|
# Install the soap extension
|
2018-05-26 01:47:29 +02:00
|
|
|
rm /etc/apt/preferences.d/no-debian-php && \
|
2018-02-16 18:40:13 +01:00
|
|
|
apt-get -y install libxml2-dev php-soap && \
|
|
|
|
docker-php-ext-install soap \
|
|
|
|
;fi
|
|
|
|
|
2019-02-16 16:03:42 +01:00
|
|
|
###########################################################################
|
|
|
|
# XSL:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_XSL=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_XSL} = true ]; then \
|
|
|
|
# Install the xsl extension
|
|
|
|
apt-get -y install libxslt-dev && \
|
|
|
|
docker-php-ext-install xsl \
|
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# pgsql
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_PGSQL=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
|
|
|
# Install the pgsql extension
|
|
|
|
docker-php-ext-install pgsql \
|
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# pgsql client
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_PG_CLIENT=false
|
2019-05-08 12:17:08 +02:00
|
|
|
ARG INSTALL_POSTGIS=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq gnupg \
|
|
|
|
&& . /etc/os-release \
|
|
|
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt $VERSION_CODENAME-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
|
|
|
|
&& curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
|
|
|
&& apt-get update -yqq \
|
|
|
|
&& apt-get install -yqq postgresql-client-12 postgis; \
|
2019-05-08 12:17:08 +02:00
|
|
|
if [ ${INSTALL_POSTGIS} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq postgis; \
|
2019-05-08 12:17:08 +02:00
|
|
|
fi \
|
2021-03-21 14:05:36 +01:00
|
|
|
&& apt-get purge -yqq gnupg \
|
2018-02-16 18:40:13 +01:00
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# xDebug:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_XDEBUG=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
2018-05-26 01:32:33 +02:00
|
|
|
# Install the xdebug extension
|
2021-10-17 11:45:27 +02:00
|
|
|
# https://xdebug.org/docs/compat
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] || { [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && { [ $(php -r "echo PHP_MINOR_VERSION;") = "4" ] || [ $(php -r "echo PHP_MINOR_VERSION;") = "3" ] ;} ;}; then \
|
2021-12-20 16:48:36 +01:00
|
|
|
pecl install xdebug-3.1.2; \
|
2018-05-26 01:32:33 +02:00
|
|
|
else \
|
2021-01-18 05:02:27 +01:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
|
|
|
pecl install xdebug-2.5.5; \
|
2020-02-18 02:56:45 +01:00
|
|
|
else \
|
2021-01-18 05:02:27 +01:00
|
|
|
if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
|
|
|
|
pecl install xdebug-2.9.0; \
|
|
|
|
else \
|
|
|
|
pecl install xdebug-2.9.8; \
|
|
|
|
fi \
|
2020-02-18 02:56:45 +01:00
|
|
|
fi \
|
2018-05-26 01:32:33 +02:00
|
|
|
fi && \
|
|
|
|
docker-php-ext-enable xdebug \
|
2018-02-16 18:40:13 +01:00
|
|
|
;fi
|
|
|
|
|
|
|
|
# Copy xdebug configuration for remote debugging
|
|
|
|
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
|
|
|
|
2021-01-18 05:02:27 +01:00
|
|
|
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
|
|
|
sed -i "s/xdebug.remote_host=/xdebug.client_host=/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
|
|
|
sed -i "s/xdebug.remote_connect_back=0/xdebug.discover_client_host=false/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
|
|
|
sed -i "s/xdebug.remote_port=9000/xdebug.client_port=9003/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
|
|
|
sed -i "s/xdebug.profiler_enable=0/; xdebug.profiler_enable=0/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
|
|
|
sed -i "s/xdebug.profiler_output_dir=/xdebug.output_dir=/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
|
|
|
sed -i "s/xdebug.remote_mode=req/; xdebug.remote_mode=req/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
|
|
|
sed -i "s/xdebug.remote_autostart=0/xdebug.start_with_request=yes/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
|
|
|
sed -i "s/xdebug.remote_enable=0/xdebug.mode=debug/" /usr/local/etc/php/conf.d/xdebug.ini \
|
|
|
|
;else \
|
|
|
|
sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
|
|
|
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini \
|
|
|
|
;fi
|
|
|
|
RUN sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini
|
2018-06-24 03:46:12 +02:00
|
|
|
|
2019-08-04 20:07:05 +02:00
|
|
|
###########################################################################
|
|
|
|
# pcov:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_PCOV=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_PCOV} = true ]; then \
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
|
2019-08-05 15:54:15 +02:00
|
|
|
if [ $(php -r "echo PHP_MINOR_VERSION;") != "0" ]; then \
|
2019-08-04 20:07:05 +02:00
|
|
|
pecl install pcov && \
|
2019-08-05 16:45:12 +02:00
|
|
|
docker-php-ext-enable pcov \
|
2019-08-04 20:07:05 +02:00
|
|
|
;fi \
|
|
|
|
;fi \
|
|
|
|
;fi
|
|
|
|
|
2018-06-30 10:54:46 +02:00
|
|
|
###########################################################################
|
|
|
|
# Phpdbg:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_PHPDBG=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_PHPDBG} = true ]; then \
|
|
|
|
# Load the xdebug extension only with phpunit commands
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq --force-yes php${LARADOCK_PHP_VERSION}-phpdbg \
|
2018-06-30 10:54:46 +02:00
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# Blackfire:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_BLACKFIRE=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
|
|
|
version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
|
|
|
|
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
|
|
|
|
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
|
|
|
|
&& mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
|
|
|
|
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
|
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
|
|
|
# PHP REDIS EXTENSION
|
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_PHPREDIS=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
|
|
|
# Install Php Redis Extension
|
2019-07-04 09:05:03 +02:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
|
|
|
pecl install -o -f redis-4.3.0; \
|
|
|
|
else \
|
|
|
|
pecl install -o -f redis; \
|
|
|
|
fi \
|
|
|
|
&& rm -rf /tmp/pear \
|
|
|
|
&& docker-php-ext-enable redis \
|
2018-02-16 18:40:13 +01:00
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
|
|
|
# Swoole EXTENSION
|
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_SWOOLE=false
|
2021-03-16 14:52:36 +01:00
|
|
|
RUN set -eux; \
|
|
|
|
if [ ${INSTALL_SWOOLE} = true ]; then \
|
|
|
|
# Install Php Swoole Extension
|
|
|
|
if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "50600" ]; then \
|
2021-03-22 09:27:46 +01:00
|
|
|
pecl install swoole-2.0.10; \
|
2021-03-16 14:52:36 +01:00
|
|
|
elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \
|
|
|
|
pecl install swoole-4.3.5; \
|
|
|
|
elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70100" ]; then \
|
2021-03-20 10:49:21 +01:00
|
|
|
pecl install swoole-4.5.11; \
|
2018-06-18 15:27:23 +02:00
|
|
|
else \
|
|
|
|
pecl install swoole; \
|
2021-03-16 14:52:36 +01:00
|
|
|
fi; \
|
|
|
|
docker-php-ext-enable swoole; \
|
|
|
|
php -m | grep -q 'swoole'; \
|
|
|
|
fi
|
2018-02-16 18:40:13 +01:00
|
|
|
|
2019-05-29 02:56:40 +02:00
|
|
|
###########################################################################
|
|
|
|
# Taint EXTENSION
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_TAINT=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_TAINT} = true ]; then \
|
|
|
|
# Install Php TAINT Extension
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
|
|
|
|
pecl install taint && \
|
|
|
|
docker-php-ext-enable taint && \
|
|
|
|
php -m | grep -q 'taint'; \
|
|
|
|
fi \
|
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# MongoDB:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_MONGO=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
|
|
|
# Install the mongodb extension
|
2018-06-25 14:16:25 +02:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
2021-10-07 17:32:57 +02:00
|
|
|
pecl install mongo; \
|
2021-10-07 16:49:24 +02:00
|
|
|
docker-php-ext-enable mongo; \
|
|
|
|
php -m | grep -oiE '^mongo$'; \
|
|
|
|
else \
|
2021-12-20 16:48:36 +01:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && { [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ] || [ $(php -r "echo PHP_MINOR_VERSION;") = "1" ] ;}; then \
|
2021-10-07 16:49:24 +02:00
|
|
|
pecl install mongodb-1.9.2; \
|
|
|
|
else \
|
|
|
|
pecl install mongodb; \
|
|
|
|
fi; \
|
2021-10-07 17:32:57 +02:00
|
|
|
docker-php-ext-enable mongodb; \
|
2021-10-07 16:49:24 +02:00
|
|
|
php -m | grep -oiE '^mongodb$'; \
|
|
|
|
fi; \
|
|
|
|
fi
|
2018-02-16 18:40:13 +01:00
|
|
|
|
2019-05-18 04:57:01 +02:00
|
|
|
###########################################################################
|
|
|
|
# Xhprof:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_XHPROF=false
|
|
|
|
|
2021-03-17 06:25:12 +01:00
|
|
|
RUN set -eux; \
|
|
|
|
if [ ${INSTALL_XHPROF} = true ]; then \
|
|
|
|
# Install the php xhprof extension
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") != 5 ]; then \
|
|
|
|
pecl install xhprof; \
|
|
|
|
else \
|
|
|
|
curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \
|
|
|
|
mkdir -p /tmp/xhprof; \
|
|
|
|
tar -C /tmp/xhprof -zxvf /tmp/xhprof.tar.gz --strip 1; \
|
|
|
|
( \
|
|
|
|
cd /tmp/xhprof/extension; \
|
|
|
|
phpize; \
|
|
|
|
./configure; \
|
|
|
|
make; \
|
|
|
|
make install; \
|
|
|
|
); \
|
|
|
|
rm -r /tmp/xhprof; \
|
|
|
|
rm /tmp/xhprof.tar.gz; \
|
|
|
|
fi; \
|
|
|
|
docker-php-ext-enable xhprof; \
|
|
|
|
php -m | grep -q 'xhprof'; \
|
|
|
|
fi
|
2019-05-18 04:57:01 +02:00
|
|
|
|
2021-03-17 06:25:12 +01:00
|
|
|
# if [ ${INSTALL_XHPROF_USE_TIDYWAYS} = true ]; then \
|
|
|
|
# https://github.com/tideways/php-xhprof-extension
|
|
|
|
# fi
|
2019-05-18 04:57:01 +02:00
|
|
|
|
2021-03-17 06:25:12 +01:00
|
|
|
# COPY ./xhprof.ini /usr/local/etc/php/conf.d
|
|
|
|
|
|
|
|
# RUN if [ ${INSTALL_XHPROF} = false ]; then \
|
|
|
|
# rm /usr/local/etc/php/conf.d/xhprof.ini \
|
|
|
|
# ;fi
|
2019-07-30 06:47:43 +02:00
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# AMQP:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_AMQP=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2021-04-25 17:48:10 +02:00
|
|
|
RUN set -eux; \
|
|
|
|
if [ ${INSTALL_AMQP} = true ]; then \
|
|
|
|
# # Install the amqp extension
|
|
|
|
apt-get -yqq install librabbitmq-dev; \
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
|
|
|
pecl install amqp-1.11.0beta; \
|
|
|
|
else \
|
|
|
|
pecl install amqp; \
|
|
|
|
fi; \
|
|
|
|
docker-php-ext-enable amqp; \
|
|
|
|
php -m | grep -oiE '^amqp$'; \
|
|
|
|
fi
|
2018-02-16 18:40:13 +01:00
|
|
|
|
2021-03-14 15:15:45 +01:00
|
|
|
###########################################################################
|
|
|
|
# CASSANDRA:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_CASSANDRA=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
|
|
|
echo "PHP Driver for Cassandra is not supported for PHP 8.0."; \
|
|
|
|
else \
|
|
|
|
apt-get install libgmp-dev -yqq && \
|
|
|
|
curl https://downloads.datastax.com/cpp-driver/ubuntu/18.04/dependencies/libuv/v1.35.0/libuv1-dev_1.35.0-1_amd64.deb -o libuv1-dev.deb && \
|
|
|
|
curl https://downloads.datastax.com/cpp-driver/ubuntu/18.04/dependencies/libuv/v1.35.0/libuv1_1.35.0-1_amd64.deb -o libuv1.deb && \
|
|
|
|
curl https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.16.0/cassandra-cpp-driver-dev_2.16.0-1_amd64.deb -o cassandra-cpp-driver-dev.deb && \
|
|
|
|
curl https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.16.0/cassandra-cpp-driver_2.16.0-1_amd64.deb -o cassandra-cpp-driver.deb && \
|
|
|
|
dpkg -i libuv1.deb && \
|
|
|
|
dpkg -i libuv1-dev.deb && \
|
|
|
|
dpkg -i cassandra-cpp-driver.deb && \
|
|
|
|
dpkg -i cassandra-cpp-driver-dev.deb && \
|
|
|
|
rm libuv1.deb libuv1-dev.deb cassandra-cpp-driver-dev.deb cassandra-cpp-driver.deb && \
|
|
|
|
cd /usr/src && \
|
|
|
|
git clone https://github.com/datastax/php-driver.git && \
|
|
|
|
cd /usr/src/php-driver/ext && \
|
|
|
|
phpize && \
|
|
|
|
mkdir /usr/src/php-driver/build && \
|
|
|
|
cd /usr/src/php-driver/build && \
|
|
|
|
../ext/configure > /dev/null && \
|
|
|
|
make clean > /dev/null && \
|
|
|
|
make > /dev/null 2>&1 && \
|
|
|
|
make install && \
|
|
|
|
echo "extension=cassandra.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/cassandra.ini && \
|
|
|
|
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/cassandra.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-cassandra.ini; \
|
|
|
|
fi \
|
|
|
|
;fi
|
|
|
|
|
2019-07-25 12:03:21 +02:00
|
|
|
###########################################################################
|
|
|
|
# GEARMAN:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_GEARMAN=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_GEARMAN} = true ]; then \
|
|
|
|
apt-get -y install libgearman-dev && \
|
|
|
|
cd /tmp && \
|
|
|
|
curl -L https://github.com/wcgallego/pecl-gearman/archive/gearman-2.0.5.zip -O && \
|
|
|
|
unzip gearman-2.0.5.zip && \
|
|
|
|
mv pecl-gearman-gearman-2.0.5 pecl-gearman && \
|
|
|
|
cd /tmp/pecl-gearman && \
|
|
|
|
phpize && \
|
|
|
|
./configure && \
|
|
|
|
make -j$(nproc) && \
|
|
|
|
make install && \
|
|
|
|
cd / && \
|
|
|
|
rm /tmp/gearman-2.0.5.zip && \
|
|
|
|
rm -r /tmp/pecl-gearman && \
|
|
|
|
docker-php-ext-enable gearman \
|
|
|
|
;fi
|
|
|
|
|
2021-12-16 04:12:21 +01:00
|
|
|
###########################################################################
|
|
|
|
# xlswriter:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_XLSWRITER=false
|
|
|
|
RUN set -eux; \
|
|
|
|
if [ ${INSTALL_XLSWRITER} = true ]; then \
|
2021-12-16 04:49:55 +01:00
|
|
|
# Install Php xlswriter Extension \
|
2022-01-12 15:05:42 +01:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") != "5" ]; then \
|
2021-12-30 11:28:14 +01:00
|
|
|
pecl install xlswriter &&\
|
|
|
|
docker-php-ext-enable xlswriter &&\
|
2021-12-16 08:17:19 +01:00
|
|
|
php -m | grep -q 'xlswriter'; \
|
|
|
|
else \
|
2021-12-30 11:28:14 +01:00
|
|
|
echo "PHP Extension for xlswriter is not supported for PHP 5.0";\
|
2021-12-20 08:19:02 +01:00
|
|
|
fi \
|
|
|
|
;fi
|
2021-12-16 04:12:21 +01:00
|
|
|
|
2018-04-24 16:25:16 +02:00
|
|
|
###########################################################################
|
|
|
|
# pcntl
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_PCNTL=false
|
2018-06-27 12:47:42 +02:00
|
|
|
RUN if [ ${INSTALL_PCNTL} = true ]; then \
|
2018-04-24 16:25:16 +02:00
|
|
|
# Installs pcntl, helpful for running Horizon
|
|
|
|
docker-php-ext-install pcntl \
|
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# bcmath:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_BCMATH=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
|
|
|
# Install the bcmath extension
|
|
|
|
docker-php-ext-install bcmath \
|
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# PHP Memcached:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_MEMCACHED=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
|
|
|
|
# Install the php memcached extension
|
2018-06-01 02:45:56 +02:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
2021-03-22 23:54:46 +01:00
|
|
|
echo '' | pecl -q install memcached-2.2.0; \
|
2018-06-01 02:45:56 +02:00
|
|
|
else \
|
2021-03-22 23:54:46 +01:00
|
|
|
echo '' | pecl -q install memcached; \
|
2019-10-07 11:06:09 +02:00
|
|
|
fi \
|
2018-02-16 18:40:13 +01:00
|
|
|
&& docker-php-ext-enable memcached \
|
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# Exif:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_EXIF=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_EXIF} = true ]; then \
|
|
|
|
# Enable Exif PHP extentions requirements
|
|
|
|
docker-php-ext-install exif \
|
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# PHP Aerospike:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
|
|
|
|
2018-03-19 15:15:24 +01:00
|
|
|
USER root
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_AEROSPIKE=false
|
|
|
|
|
2019-02-23 09:46:46 +01:00
|
|
|
RUN set -xe; \
|
|
|
|
if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
2018-02-16 18:40:13 +01:00
|
|
|
# Fix dependencies for PHPUnit within aerospike extension
|
|
|
|
apt-get -y install sudo wget && \
|
2018-04-06 09:04:56 +02:00
|
|
|
# Install the php aerospike extension
|
2018-06-01 05:02:20 +02:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
|
|
|
curl -L -o /tmp/aerospike-client-php.tar.gz https://github.com/aerospike/aerospike-client-php5/archive/master.tar.gz; \
|
|
|
|
else \
|
2019-02-22 10:46:25 +01:00
|
|
|
curl -L -o /tmp/aerospike-client-php.tar.gz https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz; \
|
2018-06-01 05:02:20 +02:00
|
|
|
fi \
|
2019-02-22 10:46:25 +01:00
|
|
|
&& mkdir -p /tmp/aerospike-client-php \
|
|
|
|
&& tar -C /tmp/aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
2018-06-01 05:02:20 +02:00
|
|
|
&& \
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
|
|
|
( \
|
2019-02-22 10:46:25 +01:00
|
|
|
cd /tmp/aerospike-client-php/src/aerospike \
|
2018-06-01 05:02:20 +02:00
|
|
|
&& phpize \
|
|
|
|
&& ./build.sh \
|
|
|
|
&& make install \
|
|
|
|
) \
|
|
|
|
else \
|
|
|
|
( \
|
2019-02-22 10:46:25 +01:00
|
|
|
cd /tmp/aerospike-client-php/src \
|
2018-06-01 05:02:20 +02:00
|
|
|
&& phpize \
|
|
|
|
&& ./build.sh \
|
|
|
|
&& make install \
|
|
|
|
) \
|
|
|
|
fi \
|
2018-02-16 18:40:13 +01:00
|
|
|
&& rm /tmp/aerospike-client-php.tar.gz \
|
2018-03-19 15:15:24 +01:00
|
|
|
&& docker-php-ext-enable aerospike \
|
2018-02-16 18:40:13 +01:00
|
|
|
;fi
|
|
|
|
|
2018-09-08 15:31:05 +02:00
|
|
|
###########################################################################
|
2019-09-12 04:54:29 +02:00
|
|
|
# PHP OCI8:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_OCI8=false
|
2020-10-16 18:06:52 +02:00
|
|
|
ARG ORACLE_INSTANT_CLIENT_MIRROR=https://github.com/diogomascarenha/oracle-instantclient/raw/master/
|
2019-09-12 04:54:29 +02:00
|
|
|
|
|
|
|
ENV LD_LIBRARY_PATH="/opt/oracle/instantclient_12_1"
|
|
|
|
ENV OCI_HOME="/opt/oracle/instantclient_12_1"
|
|
|
|
ENV OCI_LIB_DIR="/opt/oracle/instantclient_12_1"
|
|
|
|
ENV OCI_INCLUDE_DIR="/opt/oracle/instantclient_12_1/sdk/include"
|
|
|
|
ENV OCI_VERSION=12
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_OCI8} = true ]; then \
|
|
|
|
# Install wget
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install --no-install-recommends -yqq wget \
|
2019-09-12 04:54:29 +02:00
|
|
|
# Install Oracle Instantclient
|
|
|
|
&& mkdir /opt/oracle \
|
|
|
|
&& cd /opt/oracle \
|
2020-10-16 18:06:52 +02:00
|
|
|
&& wget ${ORACLE_INSTANT_CLIENT_MIRROR}instantclient-basic-linux.x64-12.1.0.2.0.zip \
|
|
|
|
&& wget ${ORACLE_INSTANT_CLIENT_MIRROR}instantclient-sdk-linux.x64-12.1.0.2.0.zip \
|
2019-09-12 04:54:29 +02:00
|
|
|
&& unzip /opt/oracle/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /opt/oracle \
|
|
|
|
&& unzip /opt/oracle/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /opt/oracle \
|
|
|
|
&& ln -s /opt/oracle/instantclient_12_1/libclntsh.so.12.1 /opt/oracle/instantclient_12_1/libclntsh.so \
|
|
|
|
&& ln -s /opt/oracle/instantclient_12_1/libclntshcore.so.12.1 /opt/oracle/instantclient_12_1/libclntshcore.so \
|
|
|
|
&& ln -s /opt/oracle/instantclient_12_1/libocci.so.12.1 /opt/oracle/instantclient_12_1/libocci.so \
|
|
|
|
&& rm -rf /opt/oracle/*.zip \
|
|
|
|
# Install PHP extensions deps
|
2021-03-21 14:05:36 +01:00
|
|
|
&& apt-get install --no-install-recommends -yqq \
|
|
|
|
libaio-dev \
|
|
|
|
freetds-dev && \
|
2019-09-12 04:54:29 +02:00
|
|
|
# Install PHP extensions
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
2021-09-10 09:32:43 +02:00
|
|
|
echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.12; \
|
|
|
|
elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
|
2020-12-02 03:38:32 +01:00
|
|
|
echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.2.0; \
|
2022-01-12 15:53:26 +01:00
|
|
|
elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
|
|
|
|
echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-3.0.1; \
|
2021-09-10 09:32:43 +02:00
|
|
|
else \
|
|
|
|
echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8; \
|
2019-09-12 04:54:29 +02:00
|
|
|
fi \
|
|
|
|
&& docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/opt/oracle/instantclient_12_1,12.1 \
|
|
|
|
&& docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \
|
|
|
|
&& docker-php-ext-install \
|
|
|
|
pdo_oci \
|
|
|
|
&& docker-php-ext-enable \
|
|
|
|
oci8 \
|
|
|
|
;fi
|
|
|
|
|
2018-09-08 15:31:05 +02:00
|
|
|
###########################################################################
|
|
|
|
# IonCube Loader:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_IONCUBE=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_IONCUBE} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") != "8" ]; then \
|
|
|
|
# Install the php ioncube loader
|
|
|
|
curl -L -o /tmp/ioncube_loaders_lin_x86-64.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
|
|
|
|
&& tar zxpf /tmp/ioncube_loaders_lin_x86-64.tar.gz -C /tmp \
|
|
|
|
&& mv /tmp/ioncube/ioncube_loader_lin_${LARADOCK_PHP_VERSION}.so $(php -r "echo ini_get('extension_dir');")/ioncube_loader.so \
|
|
|
|
&& printf "zend_extension=ioncube_loader.so\n" > $PHP_INI_DIR/conf.d/0ioncube.ini \
|
|
|
|
&& rm -rf /tmp/ioncube* \
|
2021-10-09 04:45:57 +02:00
|
|
|
&& php -m | grep -oiE '^ionCube Loader$' \
|
2021-03-21 14:05:36 +01:00
|
|
|
;fi \
|
2018-09-08 15:31:05 +02:00
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# Opcache:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_OPCACHE=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
|
|
|
|
docker-php-ext-install opcache \
|
|
|
|
;fi
|
|
|
|
|
|
|
|
# Copy opcache configration
|
|
|
|
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# Mysqli Modifications:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_MYSQLI=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_MYSQLI} = true ]; then \
|
|
|
|
docker-php-ext-install mysqli \
|
|
|
|
;fi
|
|
|
|
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# Human Language and Character Encoding Support:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_INTL=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_INTL} = true ]; then \
|
|
|
|
# Install intl and requirements
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq zlib1g-dev libicu-dev g++ && \
|
2018-02-16 18:40:13 +01:00
|
|
|
docker-php-ext-configure intl && \
|
|
|
|
docker-php-ext-install intl \
|
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# GHOSTSCRIPT:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_GHOSTSCRIPT=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
|
|
|
# Install the ghostscript extension
|
|
|
|
# for PDF editing
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq \
|
2018-02-16 18:40:13 +01:00
|
|
|
poppler-utils \
|
|
|
|
ghostscript \
|
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# LDAP:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
|
|
|
|
ARG INSTALL_LDAP=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_LDAP} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq libldap2-dev && \
|
2018-02-16 18:40:13 +01:00
|
|
|
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
|
|
|
|
docker-php-ext-install ldap \
|
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# SQL SERVER:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
ARG INSTALL_MSSQL=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2019-02-23 09:46:46 +01:00
|
|
|
RUN set -eux; \
|
|
|
|
if [ ${INSTALL_MSSQL} = true ]; then \
|
2018-06-11 08:23:40 +02:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
2021-03-22 20:34:34 +01:00
|
|
|
apt-get -yqq install freetds-dev libsybdb5 \
|
2018-06-11 08:23:40 +02:00
|
|
|
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/libsybdb.so \
|
|
|
|
&& docker-php-ext-install mssql pdo_dblib \
|
2021-08-30 12:50:37 +02:00
|
|
|
&& php -m | grep -oiE '^mssql$' \
|
|
|
|
&& php -m | grep -oiE '^pdo_dblib$' \
|
2018-06-11 08:23:40 +02:00
|
|
|
;else \
|
|
|
|
###########################################################################
|
|
|
|
# Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image
|
|
|
|
###########################################################################
|
|
|
|
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux
|
2021-08-30 12:50:37 +02:00
|
|
|
apt-get install -yqq apt-transport-https gnupg lsb-release \
|
2018-06-11 08:23:40 +02:00
|
|
|
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
|
2021-08-30 12:50:37 +02:00
|
|
|
&& curl https://packages.microsoft.com/config/debian/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list \
|
2018-06-11 08:23:40 +02:00
|
|
|
&& apt-get update -yqq \
|
2021-03-21 14:05:36 +01:00
|
|
|
&& ACCEPT_EULA=Y apt-get install -yqq unixodbc unixodbc-dev libgss3 odbcinst msodbcsql17 locales \
|
2018-06-11 08:23:40 +02:00
|
|
|
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
|
2018-07-29 06:42:13 +02:00
|
|
|
&& ln -sfn /etc/locale.alias /usr/share/locale/locale.alias \
|
2018-06-11 08:23:40 +02:00
|
|
|
&& locale-gen \
|
2021-08-30 12:50:37 +02:00
|
|
|
&& if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \
|
2019-02-22 16:45:21 +01:00
|
|
|
pecl install pdo_sqlsrv-5.3.0 sqlsrv-5.3.0 \
|
2021-08-30 12:50:37 +02:00
|
|
|
;elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70100" ]; then \
|
|
|
|
pecl install pdo_sqlsrv-5.6.1 sqlsrv-5.6.1 \
|
|
|
|
;elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70200" ]; then \
|
|
|
|
pecl install pdo_sqlsrv-5.8.1 sqlsrv-5.8.1 \
|
2019-02-22 16:45:21 +01:00
|
|
|
;else \
|
|
|
|
pecl install pdo_sqlsrv sqlsrv \
|
|
|
|
;fi \
|
2018-06-11 08:23:40 +02:00
|
|
|
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
|
2021-08-30 12:50:37 +02:00
|
|
|
&& php -m | grep -oiE '^pdo_sqlsrv$' \
|
|
|
|
&& php -m | grep -oiE '^sqlsrv$' \
|
2018-06-11 08:23:40 +02:00
|
|
|
;fi \
|
2019-02-23 09:46:46 +01:00
|
|
|
;fi
|
2018-02-16 18:40:13 +01:00
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# Image optimizers:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
USER root
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq jpegoptim optipng pngquant gifsicle \
|
2018-02-16 18:40:13 +01:00
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-16 18:40:13 +01:00
|
|
|
# ImageMagick:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
USER root
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
ARG INSTALL_IMAGEMAGICK=false
|
2021-03-12 02:20:32 +01:00
|
|
|
ARG IMAGEMAGICK_VERSION=latest
|
|
|
|
ENV IMAGEMAGICK_VERSION ${IMAGEMAGICK_VERSION}
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq libmagickwand-dev imagemagick && \
|
2021-03-12 02:20:32 +01:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
|
|
|
cd /tmp && \
|
|
|
|
if [ ${IMAGEMAGICK_VERSION} = "latest" ]; then \
|
|
|
|
git clone https://github.com/Imagick/imagick; \
|
|
|
|
else \
|
|
|
|
git clone --branch ${IMAGEMAGICK_VERSION} https://github.com/Imagick/imagick; \
|
|
|
|
fi && \
|
|
|
|
cd imagick && \
|
|
|
|
phpize && \
|
|
|
|
./configure && \
|
|
|
|
make && \
|
|
|
|
make install && \
|
|
|
|
rm -r /tmp/imagick; \
|
|
|
|
else \
|
|
|
|
pecl install imagick; \
|
|
|
|
fi && \
|
2021-04-04 14:46:57 +02:00
|
|
|
docker-php-ext-enable imagick; \
|
|
|
|
php -m | grep -q 'imagick' \
|
2018-02-16 18:40:13 +01:00
|
|
|
;fi
|
|
|
|
|
2019-12-28 01:34:56 +01:00
|
|
|
###########################################################################
|
|
|
|
# SMB:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_SMB=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_SMB} = true ]; then \
|
2021-09-20 11:11:45 +02:00
|
|
|
apt-get install -yqq smbclient libsmbclient-dev coreutils && \
|
2021-08-30 12:50:37 +02:00
|
|
|
pecl install smbclient && \
|
2021-08-30 14:10:24 +02:00
|
|
|
docker-php-ext-enable smbclient \
|
2019-12-28 01:34:56 +01:00
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-26 14:27:56 +01:00
|
|
|
# IMAP:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
|
|
|
|
2018-02-26 14:27:56 +01:00
|
|
|
ARG INSTALL_IMAP=false
|
2018-04-06 09:04:56 +02:00
|
|
|
|
2018-02-26 14:27:56 +01:00
|
|
|
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq libc-client-dev libkrb5-dev && \
|
2018-02-26 14:27:56 +01:00
|
|
|
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
|
|
|
|
docker-php-ext-install imap \
|
|
|
|
;fi
|
|
|
|
|
2018-07-13 12:31:13 +02:00
|
|
|
###########################################################################
|
|
|
|
# Calendar:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_CALENDAR=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_CALENDAR} = true ]; then \
|
|
|
|
docker-php-ext-configure calendar && \
|
|
|
|
docker-php-ext-install calendar \
|
|
|
|
;fi
|
|
|
|
|
2018-09-22 09:45:41 +02:00
|
|
|
###########################################################################
|
|
|
|
# Phalcon:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_PHALCON=false
|
|
|
|
ARG LARADOCK_PHALCON_VERSION
|
|
|
|
ENV LARADOCK_PHALCON_VERSION ${LARADOCK_PHALCON_VERSION}
|
|
|
|
|
2019-01-10 14:50:59 +01:00
|
|
|
# Copy phalcon configration
|
|
|
|
COPY ./phalcon.ini /usr/local/etc/php/conf.d/phalcon.ini.disable
|
|
|
|
|
2018-09-22 09:45:41 +02:00
|
|
|
RUN if [ $INSTALL_PHALCON = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq unzip libpcre3-dev gcc make re2c git automake autoconf\
|
2020-04-30 18:57:27 +02:00
|
|
|
&& git clone https://github.com/jbboehr/php-psr.git \
|
|
|
|
&& cd php-psr \
|
|
|
|
&& phpize \
|
|
|
|
&& ./configure \
|
|
|
|
&& make \
|
|
|
|
&& make test \
|
|
|
|
&& make install \
|
2018-09-22 09:45:41 +02:00
|
|
|
&& curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${LARADOCK_PHALCON_VERSION}.zip \
|
|
|
|
&& unzip -d /tmp/ /tmp/cphalcon.zip \
|
|
|
|
&& cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \
|
|
|
|
&& ./install \
|
2019-01-10 14:50:59 +01:00
|
|
|
&& mv /usr/local/etc/php/conf.d/phalcon.ini.disable /usr/local/etc/php/conf.d/phalcon.ini \
|
2018-09-22 09:45:41 +02:00
|
|
|
&& rm -rf /tmp/cphalcon* \
|
|
|
|
;fi
|
|
|
|
|
2019-01-08 08:30:12 +01:00
|
|
|
###########################################################################
|
|
|
|
# APCU:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_APCU=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_APCU} = true ]; then \
|
2019-02-09 09:33:06 +01:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
|
|
|
pecl install -a apcu-4.0.11; \
|
|
|
|
else \
|
|
|
|
pecl install apcu; \
|
|
|
|
fi && \
|
2019-01-08 08:30:12 +01:00
|
|
|
docker-php-ext-enable apcu \
|
2019-01-09 14:22:42 +01:00
|
|
|
;fi
|
2019-01-08 08:30:12 +01:00
|
|
|
|
2018-11-22 01:12:52 +01:00
|
|
|
###########################################################################
|
|
|
|
# YAML:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_YAML=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_YAML} = true ]; then \
|
2021-03-22 10:08:18 +01:00
|
|
|
apt-get install -yqq libyaml-dev; \
|
2019-02-09 09:33:06 +01:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
2021-03-21 17:10:08 +01:00
|
|
|
echo '' | pecl install -a yaml-1.3.2; \
|
|
|
|
elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
|
|
|
|
echo '' | pecl install yaml-2.0.4; \
|
2019-02-09 09:33:06 +01:00
|
|
|
else \
|
2021-03-21 17:10:08 +01:00
|
|
|
echo '' | pecl install yaml; \
|
|
|
|
fi \
|
2021-03-21 18:21:34 +01:00
|
|
|
&& docker-php-ext-enable yaml \
|
2018-11-22 01:12:52 +01:00
|
|
|
;fi
|
|
|
|
|
2019-05-08 12:15:09 +02:00
|
|
|
###########################################################################
|
|
|
|
# RDKAFKA:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_RDKAFKA=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_RDKAFKA} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq librdkafka-dev && \
|
2019-05-08 12:15:09 +02:00
|
|
|
pecl install rdkafka && \
|
|
|
|
docker-php-ext-enable rdkafka \
|
|
|
|
;fi
|
|
|
|
|
2019-02-14 14:52:40 +01:00
|
|
|
###########################################################################
|
2019-10-08 21:35:55 +02:00
|
|
|
# GETTEXT:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_GETTEXT=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_GETTEXT} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq zlib1g-dev libicu-dev g++ libpq-dev libssl-dev gettext && \
|
2019-10-08 21:35:55 +02:00
|
|
|
docker-php-ext-install gettext \
|
|
|
|
;fi
|
|
|
|
|
2019-02-14 14:52:40 +01:00
|
|
|
###########################################################################
|
|
|
|
# Install additional locales:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_ADDITIONAL_LOCALES=false
|
|
|
|
ARG ADDITIONAL_LOCALES
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_ADDITIONAL_LOCALES} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get install -yqq locales \
|
2019-02-14 14:52:40 +01:00
|
|
|
&& echo '' >> /usr/share/locale/locale.alias \
|
|
|
|
&& temp="${ADDITIONAL_LOCALES%\"}" \
|
|
|
|
&& temp="${temp#\"}" \
|
|
|
|
&& for i in ${temp}; do sed -i "/$i/s/^#//g" /etc/locale.gen; done \
|
|
|
|
&& locale-gen \
|
|
|
|
;fi
|
|
|
|
|
2019-02-22 11:30:05 +01:00
|
|
|
###########################################################################
|
|
|
|
# MySQL Client:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_MYSQL_CLIENT=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
|
2019-10-25 18:15:40 +02:00
|
|
|
apt-get -y install default-mysql-client \
|
2019-05-08 16:27:39 +02:00
|
|
|
;fi
|
|
|
|
|
2019-06-06 05:59:13 +02:00
|
|
|
###########################################################################
|
|
|
|
# ping:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_PING=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_PING} = true ]; then \
|
|
|
|
apt-get -y install inetutils-ping \
|
|
|
|
;fi
|
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
# sshpass:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_SSHPASS=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_SSHPASS} = true ]; then \
|
|
|
|
apt-get -y install sshpass \
|
|
|
|
;fi
|
|
|
|
|
2021-02-09 13:17:08 +01:00
|
|
|
###########################################################################
|
|
|
|
# Docker Client:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_DOCKER_CLIENT=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_DOCKER_CLIENT} = true ]; then \
|
|
|
|
curl -sS https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz -o /tmp/docker.tar.gz && \
|
|
|
|
tar -xzf /tmp/docker.tar.gz -C /tmp/ && \
|
|
|
|
cp /tmp/docker/docker* /usr/local/bin && \
|
|
|
|
chmod +x /usr/local/bin/docker* \
|
|
|
|
;fi
|
|
|
|
|
2019-05-08 16:27:39 +02:00
|
|
|
###########################################################################
|
|
|
|
# FFMPEG:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_FFMPEG=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_FFMPEG} = true ]; then \
|
|
|
|
apt-get -y install ffmpeg \
|
2019-07-02 16:11:58 +02:00
|
|
|
;fi
|
|
|
|
|
2020-10-10 16:39:43 +02:00
|
|
|
###########################################################################
|
|
|
|
# BBC Audio Waveform Image Generator:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_AUDIOWAVEFORM=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_AUDIOWAVEFORM} = true ]; then \
|
2021-03-21 14:05:36 +01:00
|
|
|
apt-get -y install wget make cmake gcc g++ libmad0-dev libid3tag0-dev libsndfile1-dev libgd-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev \
|
2021-07-29 11:24:39 +02:00
|
|
|
&& cd /tmp \
|
2020-10-10 16:39:43 +02:00
|
|
|
&& git clone https://github.com/bbc/audiowaveform.git \
|
|
|
|
&& cd audiowaveform \
|
2021-07-29 11:24:39 +02:00
|
|
|
&& git clone --depth=1 https://github.com/google/googletest.git -b release-1.11.0 \
|
2020-10-10 16:39:43 +02:00
|
|
|
&& mkdir build \
|
|
|
|
&& cd build \
|
|
|
|
&& cmake .. \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
;fi
|
2021-07-29 11:24:39 +02:00
|
|
|
|
2020-10-10 16:39:43 +02:00
|
|
|
|
2020-01-15 18:01:35 +01:00
|
|
|
#####################################
|
|
|
|
# wkhtmltopdf:
|
|
|
|
#####################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_WKHTMLTOPDF=false
|
2022-05-16 21:36:20 +02:00
|
|
|
ARG WKHTMLTOPDF_VERSION=0.12.6-1
|
2020-01-15 18:01:35 +01:00
|
|
|
|
|
|
|
RUN if [ ${INSTALL_WKHTMLTOPDF} = true ]; then \
|
2022-05-16 19:57:46 +02:00
|
|
|
ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
|
|
|
|
&& apt-get install -yqq \
|
2021-03-21 14:05:36 +01:00
|
|
|
libxrender1 \
|
|
|
|
libfontconfig1 \
|
|
|
|
libx11-dev \
|
|
|
|
libjpeg62 \
|
|
|
|
libxtst6 \
|
|
|
|
fontconfig \
|
|
|
|
libjpeg62-turbo \
|
|
|
|
xfonts-base \
|
|
|
|
xfonts-75dpi \
|
|
|
|
wget \
|
2022-05-16 21:36:20 +02:00
|
|
|
&& wget "https://github.com/wkhtmltopdf/packaging/releases/download/${WKHTMLTOPDF_VERSION}/wkhtmltox_0.12.6-1.stretch_${ARCH}.deb" \
|
|
|
|
&& dpkg -i "wkhtmltox_${WKHTMLTOPDF_VERSION}.stretch_${ARCH}.deb" \
|
2020-08-26 06:40:45 +02:00
|
|
|
&& apt -f install \
|
2020-01-15 18:01:35 +01:00
|
|
|
;fi
|
|
|
|
|
2021-09-19 22:48:42 +02:00
|
|
|
#####################################
|
|
|
|
# trader:
|
|
|
|
#####################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_TRADER=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_TRADER} = true ]; then \
|
|
|
|
pecl install trader \
|
|
|
|
&& echo "extension=trader.so" >> $PHP_INI_DIR/conf.d/trader.ini \
|
|
|
|
;fi
|
|
|
|
|
2019-07-02 16:11:58 +02:00
|
|
|
###########################################################################
|
|
|
|
# Mailparse extension:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_MAILPARSE=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_MAILPARSE} = true ]; then \
|
|
|
|
# Install mailparse extension
|
|
|
|
printf "\n" | pecl install -o -f mailparse \
|
|
|
|
&& rm -rf /tmp/pear \
|
|
|
|
&& docker-php-ext-enable mailparse \
|
2019-02-22 11:30:05 +01:00
|
|
|
;fi
|
|
|
|
|
2019-12-03 11:53:42 +01:00
|
|
|
###########################################################################
|
|
|
|
# CacheTool:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_CACHETOOL=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_CACHETOOL} = true ]; then \
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") -ge 1 ]; then \
|
|
|
|
curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar; \
|
|
|
|
else \
|
|
|
|
curl http://gordalina.github.io/cachetool/downloads/cachetool-3.2.1.phar -o cachetool.phar; \
|
|
|
|
fi && \
|
|
|
|
chmod +x cachetool.phar && \
|
|
|
|
mv cachetool.phar /usr/local/bin/cachetool \
|
|
|
|
;fi
|
|
|
|
|
2020-06-16 18:05:03 +02:00
|
|
|
###########################################################################
|
|
|
|
# XMLRPC:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG INSTALL_XMLRPC=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_XMLRPC} = true ]; then \
|
2021-03-17 10:29:40 +01:00
|
|
|
apt-get -yq install libxml2-dev; \
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
2021-12-20 16:48:36 +01:00
|
|
|
pecl install xmlrpc-1.0.0RC3; \
|
2021-03-17 10:29:40 +01:00
|
|
|
docker-php-ext-enable xmlrpc; \
|
|
|
|
else \
|
|
|
|
docker-php-ext-install xmlrpc; \
|
|
|
|
fi \
|
2020-06-16 18:05:03 +02:00
|
|
|
;fi
|
|
|
|
|
2021-01-27 08:24:44 +01:00
|
|
|
###########################################################################
|
|
|
|
# PHP DECIMAL:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_PHPDECIMAL=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_PHPDECIMAL} = true ]; then \
|
2021-03-28 05:18:39 +02:00
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
|
|
|
echo 'decimal not support PHP 5.6'; \
|
|
|
|
else \
|
|
|
|
apt-get install -yqq libmpdec-dev \
|
|
|
|
&& pecl install decimal \
|
|
|
|
&& docker-php-ext-enable decimal \
|
|
|
|
&& php -m | grep -q 'decimal' \
|
|
|
|
;fi \
|
2021-01-27 08:24:44 +01:00
|
|
|
;fi
|
|
|
|
|
2021-04-05 12:34:49 +02:00
|
|
|
###########################################################################
|
|
|
|
# zookeeper
|
|
|
|
###########################################################################
|
|
|
|
ARG INSTALL_ZOOKEEPER=false
|
|
|
|
|
|
|
|
RUN set -eux; \
|
|
|
|
if [ ${INSTALL_ZOOKEEPER} = true ]; then \
|
|
|
|
apt install -yqq libzookeeper-mt-dev; \
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
|
|
|
curl -L -o /tmp/php-zookeeper.tar.gz https://github.com/php-zookeeper/php-zookeeper/archive/master.tar.gz; \
|
|
|
|
mkdir -p /tmp/php-zookeeper; \
|
|
|
|
tar -C /tmp/php-zookeeper -zxvf /tmp/php-zookeeper.tar.gz --strip 1; \
|
|
|
|
cd /tmp/php-zookeeper; \
|
|
|
|
phpize && ./configure && make && make install;\
|
|
|
|
else \
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
|
|
|
pecl install zookeeper-0.5.0; \
|
|
|
|
else \
|
|
|
|
pecl install zookeeper-0.7.2; \
|
|
|
|
fi; \
|
|
|
|
fi; \
|
|
|
|
docker-php-ext-enable zookeeper; \
|
|
|
|
php -m | grep -q 'zookeeper'; \
|
|
|
|
fi
|
|
|
|
|
2020-10-27 11:23:15 +01:00
|
|
|
###########################################################################
|
|
|
|
# New Relic for PHP:
|
|
|
|
###########################################################################
|
2020-12-17 13:09:06 +01:00
|
|
|
ARG NEW_RELIC=${NEW_RELIC}
|
|
|
|
ARG NEW_RELIC_KEY=${NEW_RELIC_KEY}
|
|
|
|
ARG NEW_RELIC_APP_NAME=${NEW_RELIC_APP_NAME}
|
2020-10-27 11:23:15 +01:00
|
|
|
|
2020-12-17 13:09:06 +01:00
|
|
|
RUN if [ ${NEW_RELIC} = true ]; then \
|
2021-09-28 04:57:04 +02:00
|
|
|
curl -L http://download.newrelic.com/php_agent/release/newrelic-php5-9.18.1.303-linux.tar.gz | tar -C /tmp -zx && \
|
2020-10-27 11:23:15 +01:00
|
|
|
export NR_INSTALL_USE_CP_NOT_LN=1 && \
|
|
|
|
export NR_INSTALL_SILENT=1 && \
|
|
|
|
/tmp/newrelic-php5-*/newrelic-install install && \
|
|
|
|
rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* && \
|
|
|
|
sed -i \
|
2021-09-06 04:00:58 +02:00
|
|
|
-e 's/"REPLACE_WITH_REAL_KEY"/"'${NEW_RELIC_KEY}'"/' \
|
|
|
|
-e 's/newrelic.appname = "PHP Application"/newrelic.appname = "'${NEW_RELIC_APP_NAME}'"/' \
|
2020-10-27 11:23:15 +01:00
|
|
|
-e 's/;newrelic.daemon.app_connect_timeout =.*/newrelic.daemon.app_connect_timeout=15s/' \
|
|
|
|
-e 's/;newrelic.daemon.start_timeout =.*/newrelic.daemon.start_timeout=5s/' \
|
2020-12-17 13:09:06 +01:00
|
|
|
/usr/local/etc/php/conf.d/newrelic.ini \
|
|
|
|
;fi
|
2021-06-12 14:49:45 +02:00
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
# PHP SSDB:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_SSDB=false
|
|
|
|
|
|
|
|
RUN set -xe; \
|
|
|
|
if [ ${INSTALL_SSDB} = true ] && [ $(php -r "echo PHP_MAJOR_VERSION;") != "8" ]; then \
|
|
|
|
apt-get -y install sudo wget && \
|
|
|
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
|
|
|
|
curl -L -o /tmp/ssdb-client-php.tar.gz https://github.com/jonnywang/phpssdb/archive/php7.tar.gz; \
|
|
|
|
else \
|
|
|
|
curl -L -o /tmp/ssdb-client-php.tar.gz https://github.com/jonnywang/phpssdb/archive/master.tar.gz; \
|
|
|
|
fi \
|
|
|
|
&& mkdir -p /tmp/ssdb-client-php \
|
|
|
|
&& tar -C /tmp/ssdb-client-php -zxvf /tmp/ssdb-client-php.tar.gz --strip 1 \
|
|
|
|
&& cd /tmp/ssdb-client-php \
|
|
|
|
&& phpize \
|
|
|
|
&& ./configure \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
&& rm /tmp/ssdb-client-php.tar.gz \
|
|
|
|
&& docker-php-ext-enable ssdb \
|
|
|
|
;fi
|
2020-09-04 22:18:48 +02:00
|
|
|
###########################################################################
|
|
|
|
# Downgrade Openssl:
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
ARG DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL=false
|
|
|
|
|
|
|
|
RUN if [ ${DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL} = true ]; then \
|
|
|
|
sed -i 's,^\(MinProtocol[ ]*=\).*,\1'TLSv1.2',g' /etc/ssl/openssl.cnf \
|
|
|
|
&& \
|
|
|
|
sed -i 's,^\(CipherString[ ]*=\).*,\1'DEFAULT@SECLEVEL=1',g' /etc/ssl/openssl.cnf\
|
|
|
|
;fi
|
|
|
|
|
2022-03-07 05:10:38 +01:00
|
|
|
###########################################################################
|
|
|
|
# zmq
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG INSTALL_ZMQ=false
|
|
|
|
|
|
|
|
RUN if [ ${INSTALL_ZMQ} = true ]; then \
|
|
|
|
apt-get install --yes git libzmq3-dev \
|
2022-03-28 18:41:36 +02:00
|
|
|
&& git clone https://github.com/zeromq/php-zmq.git \
|
2022-03-07 05:10:38 +01:00
|
|
|
&& cd php-zmq \
|
|
|
|
&& phpize \
|
|
|
|
&& ./configure \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
&& cd .. \
|
|
|
|
&& rm -fr php-zmq \
|
|
|
|
&& echo "extension=zmq.so" > /usr/local/etc/php/conf.d/zmq.ini \
|
|
|
|
;fi
|
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
2018-02-17 09:26:46 +01:00
|
|
|
# Check PHP version:
|
2018-04-06 09:04:56 +02:00
|
|
|
###########################################################################
|
|
|
|
|
2019-02-23 09:46:46 +01:00
|
|
|
RUN set -xe; php -v | head -n 1 | grep -q "PHP ${LARADOCK_PHP_VERSION}."
|
2018-02-17 09:26:46 +01:00
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
#
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Final Touch
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
|
2018-04-04 14:13:11 +02:00
|
|
|
COPY ./laravel.ini /usr/local/etc/php/conf.d
|
|
|
|
COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
2018-02-16 18:40:13 +01:00
|
|
|
|
2018-04-06 09:04:56 +02:00
|
|
|
USER root
|
|
|
|
|
|
|
|
# Clean up
|
|
|
|
RUN apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
|
|
|
rm /var/log/lastlog /var/log/faillog
|
2018-02-16 18:40:13 +01:00
|
|
|
|
2019-10-01 01:08:09 +02:00
|
|
|
# Configure non-root user.
|
|
|
|
ARG PUID=1000
|
|
|
|
ENV PUID ${PUID}
|
|
|
|
ARG PGID=1000
|
|
|
|
ENV PGID ${PGID}
|
|
|
|
|
|
|
|
RUN groupmod -o -g ${PGID} www-data && \
|
|
|
|
usermod -o -u ${PUID} -g www-data www-data
|
2018-02-16 18:40:13 +01:00
|
|
|
|
2018-08-21 07:41:34 +02:00
|
|
|
# Adding the faketime library to the preload file needs to be done last
|
|
|
|
# otherwise it will preload it for all commands that follow in this file
|
|
|
|
RUN if [ ${INSTALL_FAKETIME} = true ]; then \
|
|
|
|
echo "/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1" > /etc/ld.so.preload \
|
|
|
|
;fi
|
|
|
|
|
2019-12-11 07:28:14 +01:00
|
|
|
# Configure locale.
|
|
|
|
ARG LOCALE=POSIX
|
|
|
|
ENV LC_ALL ${LOCALE}
|
|
|
|
|
2018-02-16 18:40:13 +01:00
|
|
|
WORKDIR /var/www
|
|
|
|
|
|
|
|
CMD ["php-fpm"]
|
|
|
|
|
|
|
|
EXPOSE 9000
|