update docker

This commit is contained in:
Ludovic CANDELLIER
2024-01-22 22:14:36 +01:00
parent 88a57a9c32
commit 2eea4ec73d
12 changed files with 1097 additions and 653 deletions

View File

@@ -121,7 +121,7 @@ services:
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
ports:
- "127.0.0.1:${PHP_FPM_XDEBUG_PORT}:9003"
- "${PHP_FPM_XDEBUG_PORT}:9003"
expose:
- "9000"
extra_hosts:
@@ -190,12 +190,11 @@ services:
- no_proxy
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
- ${DATA_PATH_HOST}/logs/nginx:/var/log/nginx
- ${NGINX_SITES_PATH}:/etc/nginx/sites-available
- ${NGINX_SSL_PATH}:/etc/nginx/ssl
ports:
- "${NGINX_HOST_HTTP_PORT}:80"
- "${NGINX_HOST_HTTPS_PORT}:443"
depends_on:
- php-fpm
networks:
@@ -205,7 +204,7 @@ services:
- traefik.port=80
- traefik.backend=nginx
- traefik.frontend.rule=Host:opensem.docker.localhost
- traefik.http.routers.nginx.rule=Host(`opensem².docker.localhost`)
- traefik.http.routers.nginx.rule=Host(`opensem.docker.localhost`)
### MySQL ################################################
mysql:
@@ -298,7 +297,7 @@ services:
- ./data/certbot/certs/:/var/certs
- ./certbot/letsencrypt/:/var/www/letsencrypt
environment:
- CN="digital.opensem.ovh"
- CN="jardinenvie.com"
- EMAIL="ludo@huma.net"
networks:
- frontend
@@ -322,8 +321,8 @@ services:
restart: unless-stopped
image: 'quay.io/soketi/soketi:1.0-16-debian'
ports:
- '${SOKETI_PORT:-6001}:6001'
- '${SOKETI_METRICS_SERVER_PORT:-9601}:9601'
- '127.0.0.1:${SOKETI_PORT:-6001}:6001'
- '127.0.0.1:${SOKETI_METRICS_SERVER_PORT:-9601}:9601'
environment:
- SOKETI_DEBUG=1
- SOKETI_DEFAULT_APP_ID=${PUSHER_APP_ID}
@@ -331,8 +330,6 @@ services:
- SOKETI_DEFAULT_APP_SECRET=${PUSHER_APP_SECRET}
- SOKETI_DEFAULT_APP_ENABLE_CLIENT_MESSAGES=true
- DEFAULT_APP_USER_AUTHENTICATION=true
expose:
- "6001"
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
networks:
@@ -365,8 +362,8 @@ services:
- INSTALL_MONGO=${LARAVEL_HORIZON_INSTALL_MONGO}
- INSTALL_FFMPEG=${LARAVEL_HORIZON_INSTALL_FFMPEG}
- INSTALL_AUDIOWAVEFORM=${LARAVEL_HORIZON_INSTALL_AUDIOWAVEFORM}
- PUID=${LARAVEL_HORIZON_PUID}
- PGID=${LARAVEL_HORIZON_PGID}
- PUID=${PUID}
- PGID=${PGID}
- IMAGEMAGICK_VERSION=${LARAVEL_HORIZON_IMAGEMAGICK_VERSION}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
@@ -378,26 +375,22 @@ services:
networks:
- backend
### Proxy ###########################################
proxy:
restart: always
build:
context: ./proxy
args:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TIMEZONE}
### Meilisearch
meilisearch:
container_name: meilisearch
image: getmeili/meilisearch:latest
environment:
- http_proxy
- https_proxy
- no_proxy
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
- ${PROXY_HOST_LOG_PATH}:/var/log/nginx
- ${PROXY_SITES_PATH}:/etc/nginx/sites-available
- ${PROXY_SSL_PATH}:/etc/nginx/ssl
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY:-masterKey}
# - MEILI_NO_ANALYTICS=${MEILI_NO_ANALYTICS:-true}
# - MEILI_ENV=${MEILI_ENV:-development}
# - MEILI_LOG_LEVEL
# - MEILI_DB_PATH=${MEILI_DB_PATH:-/data.ms}
ports:
- "${NGINX_HOST_HTTP_PORT}:80"
- "${NGINX_HOST_HTTPS_PORT}:443"
- ${MEILI_PORT:-7700}:7700
networks:
- frontend
- backend
volumes:
- ${DATA_PATH_HOST}/meili_data:/meili_data
restart: unless-stopped

344
docker/laravel-horizon/Dockerfile Executable file
View File

@@ -0,0 +1,344 @@
#
#--------------------------------------------------------------------------
# Image Setup
#--------------------------------------------------------------------------
#
ARG LARADOCK_PHP_VERSION
FROM php:${LARADOCK_PHP_VERSION}-alpine
LABEL maintainer="Ludovic CANDELLIER <ludo@huma.net>"
ARG LARADOCK_PHP_VERSION
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
ARG CHANGE_SOURCE=false
RUN if [ ${CHANGE_SOURCE} = true ]; then \
# Change application source from dl-cdn.alpinelinux.org to aliyun source
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \
;fi
RUN apk --update add wget \
curl \
git \
build-base \
libmcrypt-dev \
libxml2-dev \
pcre-dev \
zlib-dev \
autoconf \
cyrus-sasl-dev \
libgsasl-dev \
oniguruma-dev \
supervisor \
procps; \
if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "50600" ] || \
[ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \
apk --update add libressl libressl-dev; \
else \
apk --update add openssl-dev; \
fi
RUN pecl channel-update pecl.php.net; \
docker-php-ext-install mysqli mbstring pdo pdo_mysql xml pcntl; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] && \
[ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") != "80000" ]; then \
php -m | grep -oiE '^tokenizer$'; \
else \
docker-php-ext-install tokenizer; \
fi
# Add a non-root user to help install ffmpeg:
ARG PUID=1000
ENV PUID ${PUID}
ARG PGID=1000
ENV PGID ${PGID}
RUN addgroup -g ${PGID} laradock && \
adduser -D -G laradock -u ${PUID} laradock
#Install BZ2:
ARG INSTALL_BZ2=false
RUN if [ ${INSTALL_BZ2} = true ]; then \
apk --update add bzip2-dev; \
docker-php-ext-install bz2 \
;fi
###########################################################################
# PHP GnuPG:
###########################################################################
ARG INSTALL_GNUPG=false
RUN set -eux; if [ ${INSTALL_GNUPG} = true ]; then \
apk add --no-cache --no-progress --virtual BUILD_DEPS_PHP_GNUPG gpgme-dev; \
apk add --no-cache --no-progress gpgme; \
pecl install gnupg; \
docker-php-ext-enable gnupg; \
fi
#Install LDAP
ARG INSTALL_LDAP=false;
RUN set -eux; if [ ${INSTALL_LDAP} = true ]; then \
apk add --no-cache --no-progress openldap-dev; \
docker-php-ext-install ldap; \
php -m | grep -oiE '^ldap$'; \
fi
#Install GD package:
ARG INSTALL_GD=false
RUN if [ ${INSTALL_GD} = true ]; then \
apk add --update --no-cache freetype-dev libjpeg-turbo-dev jpeg-dev libpng-dev; \
if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "80000" ] || [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70400" ]; then \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
else \
## docker-php-ext-configure gd --with-freetype-dir=/usr/lib/ --with-jpeg-dir=/usr/lib/ --with-png-dir=/usr/lib/; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
fi && \
docker-php-ext-install gd \
;fi
#Install ImageMagick package:
ARG INSTALL_IMAGEMAGICK=false
ARG IMAGEMAGICK_VERSION=latest
ENV IMAGEMAGICK_VERSION ${IMAGEMAGICK_VERSION}
RUN set -eux; \
if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apk add --update --no-cache imagemagick-dev imagemagick; \
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 && \
docker-php-ext-enable imagick; \
php -m | grep -q 'imagick'; \
fi
#Install GMP package:
ARG INSTALL_GMP=false
RUN if [ ${INSTALL_GMP} = true ]; then \
apk add --update --no-cache gmp gmp-dev; \
docker-php-ext-install gmp \
;fi
#Install BCMath package:
ARG INSTALL_BCMATH=false
RUN if [ ${INSTALL_BCMATH} = true ]; then \
docker-php-ext-install bcmath \
;fi
#Install Sockets package:
ARG INSTALL_SOCKETS=false
RUN if [ ${INSTALL_SOCKETS} = true ]; then \
docker-php-ext-install sockets \
;fi
# Install PostgreSQL drivers:
ARG INSTALL_PGSQL=false
RUN if [ ${INSTALL_PGSQL} = true ]; then \
apk --update add postgresql-dev \
&& docker-php-ext-install pdo_pgsql \
;fi
# Install ZipArchive:
ARG INSTALL_ZIP_ARCHIVE=false
RUN set -eux; \
if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
apk --update add libzip-dev && \
if [ ${LARADOCK_PHP_VERSION} = "7.3" ] || [ ${LARADOCK_PHP_VERSION} = "7.4" ] || [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
docker-php-ext-configure zip; \
else \
docker-php-ext-configure zip --with-libzip; \
fi && \
# Install the zip extension
docker-php-ext-install zip \
;fi
# Install PhpRedis package:
ARG INSTALL_PHPREDIS=false
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
# Install Php Redis Extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
printf "\n" | pecl install -o -f redis-4.3.0; \
else \
printf "\n" | pecl install -o -f redis; \
fi; \
rm -rf /tmp/pear; \
docker-php-ext-enable redis; \
fi
ARG INSTALL_FFMPEG=false
RUN if [ ${INSTALL_FFMPEG} = true ]; then \
# Add ffmpeg to horizon
apk add ffmpeg \
;fi
# Install BBC Audio Waveform Image Generator:
ARG INSTALL_AUDIOWAVEFORM=false
RUN if [ ${INSTALL_AUDIOWAVEFORM} = true ]; then \
apk add git make cmake gcc g++ libmad-dev libid3tag-dev libsndfile-dev gd-dev boost-dev libgd libpng-dev zlib-dev \
&& apk add autoconf automake libtool gettext \
&& wget https://github.com/xiph/flac/archive/1.3.3.tar.gz \
&& tar xzf 1.3.3.tar.gz \
&& cd flac-1.3.3 \
&& ./autogen.sh \
&& ./configure --enable-shared=no \
&& make \
&& make install \
&& cd .. \
&& git clone https://github.com/bbc/audiowaveform.git \
&& cd audiowaveform \
&& wget https://github.com/google/googletest/archive/release-1.10.0.tar.gz \
&& tar xzf release-1.10.0.tar.gz \
&& ln -s googletest-release-1.10.0/googletest googletest \
&& ln -s googletest-release-1.10.0/googlemock googlemock \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make install \
;fi
#####################################
# poppler-utils:
#####################################
USER root
ARG INSTALL_POPPLER_UTILS=false
RUN if [ ${INSTALL_POPPLER_UTILS} = true ]; then \
apk add --update --no-cache poppler-utils antiword \
;fi
# Install Cassandra drivers:
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 \
apk add --update --no-cache cassandra-cpp-driver libuv gmp \
&& apk add --update --no-cache cassandra-cpp-driver-dev gmp-dev --virtual .build-sec \
&& cd /usr/src \
&& git clone https://github.com/datastax/php-driver.git \
&& cd php-driver/ext \
&& phpize \
&& mkdir -p /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 \
&& docker-php-ext-enable cassandra \
&& apk del .build-sec; \
fi \
;fi
# Install MongoDB drivers:
ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install mongo; \
docker-php-ext-enable mongo; \
else \
pecl install mongodb; \
docker-php-ext-enable mongodb; \
fi; \
fi
###########################################################################
# YAML: extension
###########################################################################
ARG INSTALL_YAML=false
RUN if [ ${INSTALL_YAML} = true ]; then \
apk --update add -U --no-cache --virtual temp yaml-dev \
&& apk add --no-cache yaml \
&& docker-php-source extract; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install yaml-1.3.2; \
elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
pecl install yaml-2.0.4; \
else \
pecl install yaml; \
fi \
&& docker-php-ext-enable yaml \
&& pecl clear-cache \
&& docker-php-source delete \
&& apk del temp \
;fi
###########################################################################
# PHP Memcached:
###########################################################################
ARG INSTALL_MEMCACHED=false
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
apk --update add libmemcached-dev; \
# Install the php memcached extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install memcached-2.2.0; \
else \
pecl install memcached; \
fi; \
docker-php-ext-enable memcached; \
php -m | grep -r 'memcached'; \
fi
#--------------------------------------------------------------------------
# Clean up
#--------------------------------------------------------------------------
RUN rm /var/cache/apk/* \
&& mkdir -p /var/www
#
#--------------------------------------------------------------------------
# Optional Supervisord Configuration
#--------------------------------------------------------------------------
#
# Modify the ./supervisor.conf file to match your App's requirements.
# Make sure you rebuild your container with every change.
#
COPY supervisord.conf /etc/supervisord.conf
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
#
#--------------------------------------------------------------------------
# Optional Software's Installation
#--------------------------------------------------------------------------
#
# If you need to modify this image, feel free to do it right here.
#
# -- Your awesome modifications go here -- #
#
#--------------------------------------------------------------------------
# Check PHP version
#--------------------------------------------------------------------------
#
RUN php -v | head -n 1 | grep -q "PHP ${PHP_VERSION}."
#
#--------------------------------------------------------------------------
# Final Touch
#--------------------------------------------------------------------------
#
WORKDIR /etc/supervisor/conf.d/

View File

@@ -0,0 +1,10 @@
[supervisord]
nodaemon=true
[supervisorctl]
[inet_http_server]
port = 127.0.0.1:9001
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[include]
files = supervisord.d/*.conf

View File

@@ -0,0 +1,9 @@
[program:laravel-horizon]
process_name=%(program_name)s_%(process_num)02d
user=laradock
command=php /var/www/artisan horizon
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/www/storage/logs/horizon.log
stopwaitsecs=3600

View File

@@ -0,0 +1,8 @@
[program:laravel-horizon]
process_name=%(program_name)s_%(process_num)02d
user=laradock
command=php /var/www/artisan horizon
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/www/storage/logs/horizon.log

View File

@@ -1,5 +1,4 @@
FROM matomo:latest
# FROM bitnami/minideb:latest
LABEL maintainer="Ludovic CANDELLIER <ludo@huma.net>"

View File

@@ -16,23 +16,13 @@ ARG LARADOCK_PHP_VERSION
ARG BASE_IMAGE_TAG_PREFIX=latest
FROM laradock/php-fpm:${BASE_IMAGE_TAG_PREFIX}-${LARADOCK_PHP_VERSION}
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
LABEL maintainer="Ludovic Candellier ludo@huma.net"
ARG LARADOCK_PHP_VERSION
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
ARG CHANGE_SOURCE=false
RUN if [ ${CHANGE_SOURCE} = true ]; then \
# Change application source from deb.debian.org to aliyun source
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 \
;fi
# always run apt update when start and after add new source list, then clean up at end.
RUN set -xe; \
apt-get update -yqq && \
@@ -40,7 +30,7 @@ RUN set -xe; \
apt-get install -yqq \
apt-utils \
gnupg2 \
git \
git tzdata ghostscript chromium chromium-sandbox poppler-utils \
#
#--------------------------------------------------------------------------
# Mandatory Software's Installation
@@ -81,7 +71,7 @@ ARG INSTALL_BZ2=false
RUN if [ ${INSTALL_BZ2} = true ]; then \
apt-get -yqq install libbz2-dev; \
docker-php-ext-install bz2 \
;fi
;fi
###########################################################################
# Enchant:
@@ -92,7 +82,7 @@ RUN if [ ${INSTALL_ENCHANT} = true ]; then \
apt-get install -yqq libenchant-dev; \
docker-php-ext-install enchant; \
php -m | grep -oiE '^enchant$'; \
fi
fi
###########################################################################
# GMP (GNU Multiple Precision):
@@ -107,7 +97,7 @@ RUN if [ ${INSTALL_GMP} = true ]; then \
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \
;fi && \
docker-php-ext-install gmp \
;fi
;fi
###########################################################################
# GnuPG:
@@ -137,7 +127,7 @@ RUN if [ ${INSTALL_SSH2} = true ]; then \
pecl install -a ssh2-1.3.1; \
fi && \
docker-php-ext-enable ssh2 \
;fi
;fi
###########################################################################
# libfaketime:
@@ -149,7 +139,7 @@ ARG INSTALL_FAKETIME=false
RUN if [ ${INSTALL_FAKETIME} = true ]; then \
apt-get install -yqq libfaketime \
;fi
;fi
###########################################################################
# SOAP:
@@ -162,7 +152,7 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \
rm /etc/apt/preferences.d/no-debian-php && \
apt-get -y install libxml2-dev php-soap && \
docker-php-ext-install soap \
;fi
;fi
###########################################################################
# XSL:
@@ -174,7 +164,7 @@ RUN if [ ${INSTALL_XSL} = true ]; then \
# Install the xsl extension
apt-get -y install libxslt-dev && \
docker-php-ext-install xsl \
;fi
;fi
###########################################################################
# pgsql
@@ -185,7 +175,7 @@ ARG INSTALL_PGSQL=false
RUN if [ ${INSTALL_PGSQL} = true ]; then \
# Install the pgsql extension
docker-php-ext-install pgsql \
;fi
;fi
###########################################################################
# pgsql client
@@ -193,6 +183,7 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \
ARG INSTALL_PG_CLIENT=false
ARG INSTALL_POSTGIS=false
ARG PG_CLIENT_VERSION
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
apt-get install -yqq gnupg \
@@ -200,12 +191,12 @@ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
&& 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; \
&& apt-get install -yqq postgresql-client-${PG_CLIENT_VERSION} postgis; \
if [ ${INSTALL_POSTGIS} = true ]; then \
apt-get install -yqq postgis; \
fi \
&& apt-get purge -yqq gnupg \
;fi
;fi
###########################################################################
# xDebug:
@@ -218,10 +209,10 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
# 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 \
if [ ${LARADOCK_PHP_VERSION} = "8.2" ]; then \
pecl install xdebug-3.2.0; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
pecl install xdebug-3.2.1; \
else \
pecl install xdebug-3.1.4; \
pecl install xdebug-3.1.6; \
fi; \
else \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
@@ -235,7 +226,7 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
fi \
fi && \
docker-php-ext-enable xdebug \
;fi
;fi
# Copy xdebug configuration for remote debugging
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
@@ -249,10 +240,10 @@ RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] || { [ $(php -r "echo PHP_M
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 \
;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
;fi
RUN sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini
###########################################################################
@@ -268,7 +259,7 @@ RUN if [ ${INSTALL_PCOV} = true ]; then \
pecl install pcov && \
docker-php-ext-enable pcov \
;fi \
;fi
;fi
###########################################################################
# Phpdbg:
@@ -279,7 +270,7 @@ ARG INSTALL_PHPDBG=false
RUN if [ ${INSTALL_PHPDBG} = true ]; then \
# Load the xdebug extension only with phpunit commands
apt-get install -yqq --force-yes php${LARADOCK_PHP_VERSION}-phpdbg \
;fi
;fi
###########################################################################
# Blackfire:
@@ -293,7 +284,7 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
&& 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
;fi
###########################################################################
# PHP REDIS EXTENSION
@@ -305,12 +296,14 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
# Install Php Redis Extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install -o -f redis-4.3.0; \
elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && { [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ] || [ $(php -r "echo PHP_MINOR_VERSION;") = "1" ] ;}; then \
pecl install -o -f redis-5.3.7; \
else \
pecl install -o -f redis; \
fi \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
;fi
;fi
###########################################################################
# Swoole EXTENSION
@@ -348,7 +341,7 @@ RUN if [ ${INSTALL_TAINT} = true ]; then \
docker-php-ext-enable taint && \
php -m | grep -q 'taint'; \
fi \
;fi
;fi
###########################################################################
# MongoDB:
@@ -371,7 +364,7 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
docker-php-ext-enable mongodb; \
php -m | grep -oiE '^mongodb$'; \
fi; \
fi
fi
###########################################################################
# Xhprof:
@@ -422,8 +415,12 @@ 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; \
if [ ${LARADOCK_PHP_VERSION} = "7.3" ] \
|| [ ${LARADOCK_PHP_VERSION} = "7.2" ] \
|| [ ${LARADOCK_PHP_VERSION} = "7.1" ] \
|| [ ${LARADOCK_PHP_VERSION} = "7.0" ] \
|| [ ${LARADOCK_PHP_VERSION} = "5.6" ]; then \
pecl install amqp-1.11.0; \
else \
pecl install amqp; \
fi; \
@@ -464,7 +461,7 @@ RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
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
;fi
###########################################################################
# GEARMAN:
@@ -487,7 +484,7 @@ RUN if [ ${INSTALL_GEARMAN} = true ]; then \
rm /tmp/gearman-2.0.5.zip && \
rm -r /tmp/pecl-gearman && \
docker-php-ext-enable gearman \
;fi
;fi
###########################################################################
# xlswriter:
@@ -514,7 +511,7 @@ ARG INSTALL_PCNTL=false
RUN if [ ${INSTALL_PCNTL} = true ]; then \
# Installs pcntl, helpful for running Horizon
docker-php-ext-install pcntl \
;fi
;fi
###########################################################################
# bcmath:
@@ -525,7 +522,7 @@ ARG INSTALL_BCMATH=false
RUN if [ ${INSTALL_BCMATH} = true ]; then \
# Install the bcmath extension
docker-php-ext-install bcmath \
;fi
;fi
###########################################################################
# PHP Memcached:
@@ -541,7 +538,7 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
echo '' | pecl -q install memcached; \
fi \
&& docker-php-ext-enable memcached \
;fi
;fi
###########################################################################
# Exif:
@@ -552,7 +549,7 @@ ARG INSTALL_EXIF=false
RUN if [ ${INSTALL_EXIF} = true ]; then \
# Enable Exif PHP extentions requirements
docker-php-ext-install exif \
;fi
;fi
###########################################################################
# PHP Aerospike:
@@ -592,7 +589,7 @@ RUN set -xe; \
fi \
&& rm /tmp/aerospike-client-php.tar.gz \
&& docker-php-ext-enable aerospike \
;fi
;fi
###########################################################################
# PHP OCI8:
@@ -636,6 +633,8 @@ RUN if [ ${INSTALL_OCI8} = true ]; then \
echo 'instantclient,/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/' | pecl install oci8-2.2.0; \
elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
echo "instantclient,/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/" | pecl install oci8-3.0.1; \
elif [ $(php -r "echo PHP_MAJOR_VERSION . PHP_MINOR_VERSION;") = "81" ]; then \
echo "instantclient,/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/" | pecl install oci8-3.2.1; \
else \
echo "instantclient,/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/" | pecl install oci8; \
fi \
@@ -654,7 +653,13 @@ RUN if [ ${INSTALL_OCI8} = true ]; then \
ARG INSTALL_IONCUBE=false
RUN if [ ${INSTALL_IONCUBE} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") != "8" ]; then \
if [ ${LARADOCK_PHP_VERSION} = "8.1" ] \
|| [ ${LARADOCK_PHP_VERSION} = "7.4" ] \
|| [ ${LARADOCK_PHP_VERSION} = "7.3" ] \
|| [ ${LARADOCK_PHP_VERSION} = "7.2" ] \
|| [ ${LARADOCK_PHP_VERSION} = "7.1" ] \
|| [ ${LARADOCK_PHP_VERSION} = "7.0" ] \
|| [ ${LARADOCK_PHP_VERSION} = "5.6" ]; 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 \
@@ -663,7 +668,7 @@ RUN if [ ${INSTALL_IONCUBE} = true ]; then \
&& rm -rf /tmp/ioncube* \
&& php -m | grep -oiE '^ionCube Loader$' \
;fi \
;fi
;fi
###########################################################################
# Opcache:
@@ -673,7 +678,7 @@ ARG INSTALL_OPCACHE=false
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
docker-php-ext-install opcache \
;fi
;fi
# Copy opcache configration
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
@@ -686,7 +691,7 @@ ARG INSTALL_MYSQLI=false
RUN if [ ${INSTALL_MYSQLI} = true ]; then \
docker-php-ext-install mysqli \
;fi
;fi
###########################################################################
@@ -700,7 +705,7 @@ RUN if [ ${INSTALL_INTL} = true ]; then \
apt-get install -yqq zlib1g-dev libicu-dev g++ && \
docker-php-ext-configure intl && \
docker-php-ext-install intl \
;fi
;fi
###########################################################################
# GHOSTSCRIPT:
@@ -714,7 +719,7 @@ RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
apt-get install -yqq \
poppler-utils \
ghostscript \
;fi
;fi
###########################################################################
# LDAP:
@@ -727,7 +732,7 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \
ARCH=$(arch) && \
docker-php-ext-configure ldap --with-libdir="lib/${ARCH}-linux-gnu/" && \
docker-php-ext-install ldap \
;fi
;fi
###########################################################################
# SQL SERVER:
@@ -750,10 +755,14 @@ RUN set -eux; \
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux \
apt-get update \
&& apt-get install -yqq apt-transport-https gnupg lsb-release \
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& if [ ${LARADOCK_PHP_VERSION} = "8.1" ] || [ ${LARADOCK_PHP_VERSION} = "8.2" ]; then \
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg \
;else \
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
;fi \
&& curl https://packages.microsoft.com/config/debian/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update -yqq \
&& ACCEPT_EULA=Y apt-get install -yqq unixodbc unixodbc-dev libgss3 odbcinst msodbcsql17 locales \
&& ACCEPT_EULA=Y apt-get install -yqq unixodbc unixodbc-dev libgss3 odbcinst msodbcsql18 locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& ln -sfn /etc/locale.alias /usr/share/locale/locale.alias \
&& locale-gen \
@@ -763,6 +772,10 @@ RUN set -eux; \
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 \
;elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70300" ]; then \
pecl install pdo_sqlsrv-5.9.0 sqlsrv-5.9.0 \
;elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70400" ]; then \
pecl install pdo_sqlsrv-5.10.1 sqlsrv-5.10.1 \
;else \
pecl install pdo_sqlsrv sqlsrv \
;fi \
@@ -782,7 +795,7 @@ ARG INSTALL_IMAGE_OPTIMIZERS=false
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get install -yqq jpegoptim optipng pngquant gifsicle \
;fi
;fi
###########################################################################
# ImageMagick:
@@ -795,6 +808,7 @@ ARG IMAGEMAGICK_VERSION=latest
ENV IMAGEMAGICK_VERSION ${IMAGEMAGICK_VERSION}
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apt-get update && \
apt-get install -yqq libmagickwand-dev imagemagick && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
cd /tmp && \
@@ -814,7 +828,7 @@ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
fi && \
docker-php-ext-enable imagick; \
php -m | grep -q 'imagick' \
;fi
;fi
###########################################################################
# SMB:
@@ -826,7 +840,7 @@ RUN if [ ${INSTALL_SMB} = true ]; then \
apt-get install -yqq smbclient libsmbclient-dev coreutils && \
pecl install smbclient && \
docker-php-ext-enable smbclient \
;fi
;fi
###########################################################################
# IMAP:
@@ -838,7 +852,7 @@ RUN if [ ${INSTALL_IMAP} = true ]; then \
apt-get install -yqq libc-client-dev libkrb5-dev && \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
docker-php-ext-install imap \
;fi
;fi
###########################################################################
# Calendar:
@@ -851,7 +865,7 @@ ARG INSTALL_CALENDAR=false
RUN if [ ${INSTALL_CALENDAR} = true ]; then \
docker-php-ext-configure calendar && \
docker-php-ext-install calendar \
;fi
;fi
###########################################################################
# Phalcon:
@@ -882,7 +896,7 @@ RUN if [ ${INSTALL_APCU} = true ]; then \
pecl install apcu; \
fi && \
docker-php-ext-enable apcu \
;fi
;fi
###########################################################################
# YAML:
@@ -902,7 +916,7 @@ RUN if [ ${INSTALL_YAML} = true ]; then \
echo '' | pecl install yaml; \
fi \
&& docker-php-ext-enable yaml \
;fi
;fi
###########################################################################
# RDKAFKA:
@@ -914,7 +928,7 @@ RUN if [ ${INSTALL_RDKAFKA} = true ]; then \
apt-get install -yqq librdkafka-dev && \
pecl install rdkafka && \
docker-php-ext-enable rdkafka \
;fi
;fi
###########################################################################
# GETTEXT:
@@ -925,7 +939,7 @@ ARG INSTALL_GETTEXT=false
RUN if [ ${INSTALL_GETTEXT} = true ]; then \
apt-get install -yqq zlib1g-dev libicu-dev g++ libpq-dev libssl-dev gettext && \
docker-php-ext-install gettext \
;fi
;fi
###########################################################################
# Install additional locales:
@@ -941,7 +955,7 @@ RUN if [ ${INSTALL_ADDITIONAL_LOCALES} = true ]; then \
&& temp="${temp#\"}" \
&& for i in ${temp}; do sed -i "/$i/s/^#//g" /etc/locale.gen; done \
&& locale-gen \
;fi
;fi
###########################################################################
# MySQL Client:
@@ -953,7 +967,7 @@ ARG INSTALL_MYSQL_CLIENT=false
RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
apt-get -y install default-mysql-client \
;fi
;fi
###########################################################################
# ping:
@@ -965,7 +979,7 @@ ARG INSTALL_PING=false
RUN if [ ${INSTALL_PING} = true ]; then \
apt-get -y install inetutils-ping \
;fi
;fi
###########################################################################
# sshpass:
@@ -977,7 +991,7 @@ ARG INSTALL_SSHPASS=false
RUN if [ ${INSTALL_SSHPASS} = true ]; then \
apt-get -y install sshpass \
;fi
;fi
###########################################################################
# Docker Client:
@@ -992,7 +1006,7 @@ RUN if [ ${INSTALL_DOCKER_CLIENT} = true ]; then \
tar -xzf /tmp/docker.tar.gz -C /tmp/ && \
cp /tmp/docker/docker* /usr/local/bin && \
chmod +x /usr/local/bin/docker* \
;fi
;fi
###########################################################################
# FFMPEG:
@@ -1003,8 +1017,9 @@ USER root
ARG INSTALL_FFMPEG=false
RUN if [ ${INSTALL_FFMPEG} = true ]; then \
apt-get update -y && \
apt-get -y install ffmpeg \
;fi
;fi
###########################################################################
# BBC Audio Waveform Image Generator:
@@ -1025,8 +1040,18 @@ RUN if [ ${INSTALL_AUDIOWAVEFORM} = true ]; then \
&& cmake .. \
&& make \
&& make install \
;fi
;fi
#####################################
# poppler-utils:
#####################################
USER root
ARG INSTALL_POPPLER_UTILS=false
RUN if [ ${INSTALL_POPPLER_UTILS} = true ]; then \
apt-get -y install poppler-utils antiword \
;fi
#####################################
# wkhtmltopdf:
@@ -1035,7 +1060,7 @@ RUN if [ ${INSTALL_AUDIOWAVEFORM} = true ]; then \
USER root
ARG INSTALL_WKHTMLTOPDF=false
ARG WKHTMLTOPDF_VERSION=0.12.6-1
ARG WKHTMLTOPDF_VERSION=0.12.6.1-3
RUN if [ ${INSTALL_WKHTMLTOPDF} = true ]; then \
ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
@@ -1050,10 +1075,25 @@ RUN if [ ${INSTALL_WKHTMLTOPDF} = true ]; then \
xfonts-base \
xfonts-75dpi \
wget \
&& 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" \
&& apt -f install \
;fi
# && cat /etc/os-release \
&& if [ ${LARADOCK_PHP_VERSION} = "5.6" ] || \
[ ${LARADOCK_PHP_VERSION} = "7.0" ]; then \
wget "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.stretch_${ARCH}.deb"; \
dpkg -i "wkhtmltox_0.12.6-1.stretch_${ARCH}.deb"; \
elif [ ${LARADOCK_PHP_VERSION} = "7.1" ] || \
[ ${LARADOCK_PHP_VERSION} = "7.2" ] || \
[ ${LARADOCK_PHP_VERSION} = "7.3" ] || \
[ ${LARADOCK_PHP_VERSION} = "7.4" ]; then \
wget "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_${ARCH}.deb"; \
dpkg -i "wkhtmltox_0.12.6-1.buster_${ARCH}.deb"; \
elif [ ${LARADOCK_PHP_VERSION} = "8.0" ]; then \
wget "https://github.com/wkhtmltopdf/packaging/releases/download/${WKHTMLTOPDF_VERSION}/wkhtmltox_${WKHTMLTOPDF_VERSION}.bullseye_${ARCH}.deb"; \
dpkg -i "wkhtmltox_${WKHTMLTOPDF_VERSION}.bullseye_${ARCH}.deb"; \
else \
wget "https://github.com/wkhtmltopdf/packaging/releases/download/${WKHTMLTOPDF_VERSION}/wkhtmltox_${WKHTMLTOPDF_VERSION}.bookworm_${ARCH}.deb"; \
dpkg -i "wkhtmltox_${WKHTMLTOPDF_VERSION}.bookworm_${ARCH}.deb"; \
fi \
;fi
#####################################
# trader:
@@ -1066,7 +1106,7 @@ 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
;fi
###########################################################################
# Mailparse extension:
@@ -1079,7 +1119,7 @@ RUN if [ ${INSTALL_MAILPARSE} = true ]; then \
printf "\n" | pecl install -o -f mailparse \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable mailparse \
;fi
;fi
###########################################################################
# CacheTool:
@@ -1089,13 +1129,13 @@ 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; \
curl -sO https://gordalina.github.io/cachetool/downloads/cachetool.phar; \
else \
curl http://gordalina.github.io/cachetool/downloads/cachetool-3.2.1.phar -o cachetool.phar; \
curl https://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
;fi
###########################################################################
# XMLRPC:
@@ -1111,7 +1151,7 @@ RUN if [ ${INSTALL_XMLRPC} = true ]; then \
else \
docker-php-ext-install xmlrpc; \
fi \
;fi
;fi
###########################################################################
# PHP DECIMAL:
@@ -1125,12 +1165,21 @@ RUN if [ ${INSTALL_PHPDECIMAL} = true ]; then \
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 \
;fi
if [ ${LARADOCK_PHP_VERSION} = "8.1" ] || \
[ ${LARADOCK_PHP_VERSION} = "8.2" ]; then \
curl -L -o /tmp/mpdecimal.tar.gz "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-2.5.1.tar.gz"; \
mkdir -p /tmp/mpdecimal; \
tar -C /tmp/mpdecimal -zxvf /tmp/mpdecimal.tar.gz --strip 1; \
cd /tmp/mpdecimal; \
./configure && make && make install; \
else \
apt-get install -yqq libmpdec-dev; \
fi; \
pecl install decimal; \
docker-php-ext-enable decimal; \
php -m | grep -oiE '^decimal$'; \
fi; \
fi
###########################################################################
# zookeeper
@@ -1176,7 +1225,7 @@ RUN if [ ${NEW_RELIC} = true ]; then \
-e 's/;newrelic.daemon.app_connect_timeout =.*/newrelic.daemon.app_connect_timeout=15s/' \
-e 's/;newrelic.daemon.start_timeout =.*/newrelic.daemon.start_timeout=5s/' \
/usr/local/etc/php/conf.d/newrelic.ini \
;fi
;fi
###########################################################################
# PHP SSDB:
@@ -1203,7 +1252,7 @@ RUN set -xe; \
&& make install \
&& rm /tmp/ssdb-client-php.tar.gz \
&& docker-php-ext-enable ssdb \
;fi
;fi
###########################################################################
# Downgrade Openssl:
###########################################################################
@@ -1215,7 +1264,7 @@ RUN if [ ${DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL} = true ]; then \
sed -i 's,^\(MinProtocol[ ]*=\).*,\1'TLSv${DOWNGRADE_OPENSSL_TLS_VERSION}',g' /etc/ssl/openssl.cnf \
&& \
sed -i 's,^\(CipherString[ ]*=\).*,\1'DEFAULT@SECLEVEL=1',g' /etc/ssl/openssl.cnf\
;fi
;fi
###########################################################################
# zmq
@@ -1236,7 +1285,7 @@ RUN if [ ${INSTALL_ZMQ} = true ]; then \
&& cd .. \
&& rm -fr php-zmq \
&& echo "extension=zmq.so" > /usr/local/etc/php/conf.d/zmq.ini \
;fi
;fi
############################################################################
@@ -1268,7 +1317,7 @@ RUN set -eux; \
rm /tmp/event.tar.gz &&\
docker-php-ext-enable event &&\
php -m | grep -q 'event' \
;fi
;fi
###########################################################################
# DNS utilities:
@@ -1280,7 +1329,7 @@ ARG INSTALL_DNSUTILS=false
RUN if [ ${INSTALL_DNSUTILS} = true ]; then \
apt-get update && apt-get install -y dnsutils \
;fi
;fi
###########################################################################
# Check PHP version:
@@ -1302,7 +1351,7 @@ USER root
# Clean up
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
rm /var/log/lastlog /var/log/faillog
rm -f /var/log/lastlog /var/log/faillog
# Configure non-root user.
ARG PUID=1000
@@ -1317,7 +1366,7 @@ RUN groupmod -o -g ${PGID} www-data && \
# 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
;fi
# Configure locale.
ARG LOCALE=POSIX

9
docker/phpmyadmin/Dockerfile Executable file
View File

@@ -0,0 +1,9 @@
FROM phpmyadmin/phpmyadmin
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
# Add volume for sessions to allow session persistence
VOLUME /sessions
# We expose phpMyAdmin on port 80
EXPOSE 80

7
docker/soketi/Dockerfile Executable file
View File

@@ -0,0 +1,7 @@
FROM quay.io/soketi/soketi:latest
LABEL maintainer="WuweiMing <wwm041544363@gmail.com>"
CMD ["node /app/bin/server.js start"]
EXPOSE 6001 9601

View File

@@ -23,24 +23,29 @@ RUN groupadd -g ${PGID} laradock; \
useradd -l -u ${PUID} -g laradock -m laradock; \
usermod -p "*" laradock -s /bin/bash;
ARG LARADOCK_PHP_VERSION
# always run apt update when start and after add new source list, then clean up at end.
RUN apt-get update -yqq; \
apt-get upgrade -yqq; \
apt-get -yqq install --no-install-recommends apt-transport-https lsb-release tzdata ca-certificates curl wget \
apt-utils libzip-dev joe zip unzip rsync openssh-client git mc bzip2 nano default-mysql-client supervisor inetutils-ping mydumper \
wkhtmltopdf ghostscript jpegoptim optipng pngquant gifsicle chromium chromium-sandbox
wkhtmltopdf ghostscript jpegoptim optipng pngquant gifsicle chromium chromium-sandbox poppler-utils graphviz
COPY ./apt_sources/php.list /etc/apt/sources.list.d/php.list
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg;
RUN apt-get update -yqq; \
apt install -yqq --no-install-recommends php8.0-apcu php8.0-bcmath php8.0-bz2 php8.0-cli php8.0-common php8.0-curl php8.0-dev php8.0-gd php8.0-igbinary php8.0-imagick \
php8.0-intl php8.0-mbstring php8.0-mcrypt php8.0-mysql php8.0-opcache php8.0-readline php8.0-redis php8.0-sqlite3 php8.0-tidy php8.0-uuid php8.0-xml php8.0-yaml php8.0-zip
apt install -yqq --no-install-recommends php${LARADOCK_PHP_VERSION}-apcu php${LARADOCK_PHP_VERSION}-bcmath php${LARADOCK_PHP_VERSION}-bz2 php${LARADOCK_PHP_VERSION}-cli php${LARADOCK_PHP_VERSION}-common php${LARADOCK_PHP_VERSION}-curl php${LARADOCK_PHP_VERSION}-dev php${LARADOCK_PHP_VERSION}-gd php${LARADOCK_PHP_VERSION}-igbinary php${LARADOCK_PHP_VERSION}-imagick \
php${LARADOCK_PHP_VERSION}-intl php${LARADOCK_PHP_VERSION}-mbstring php${LARADOCK_PHP_VERSION}-mcrypt php${LARADOCK_PHP_VERSION}-mysql php${LARADOCK_PHP_VERSION}-opcache php${LARADOCK_PHP_VERSION}-readline php${LARADOCK_PHP_VERSION}-redis php${LARADOCK_PHP_VERSION}-sqlite3 php${LARADOCK_PHP_VERSION}-tidy php${LARADOCK_PHP_VERSION}-uuid php${LARADOCK_PHP_VERSION}-xml php${LARADOCK_PHP_VERSION}-yaml php${LARADOCK_PHP_VERSION}-zip
RUN apt-get install -yqq --no-install-recommends nodejs npm python2
RUN apt-get install -yqq --no-install-recommends nodejs npm
RUN update-alternatives --install /usr/bin/python python /usr/bin/python2 1
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
# RUN update-alternatives --install /usr/bin/python python /usr/bin/python2 1
###########################################################################
# Set Timezone
@@ -139,7 +144,7 @@ RUN if [ ${INSTALL_SUPERVISOR} = true ]; then \
sed -i 's/\;\[include\]/\[include\]/g' /etc/supervisord.conf && \
sed -i 's/\;files\s.*/files = supervisord.d\/*.conf/g' /etc/supervisord.conf \
;fi \
;fi
;fi
###########################################################################
# GIT:
@@ -153,11 +158,19 @@ RUN if [ ${INSTALL_SUPERVISOR} = true ]; then \
RUN npm install -g pm2
###########################################################################
# NVM
###########################################################################
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
# RUN export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
# RUN [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
###########################################################################
# Check PHP version:
###########################################################################
RUN set -xe; php -v | head -n 1 | grep -q "PHP 8.0."
# RUN php -v | head -n 1 | grep -q "PHP ${PHP_VERSION}."
#
#--------------------------------------------------------------------------
@@ -178,3 +191,6 @@ RUN apt-get clean && \
WORKDIR /var/www
USER laradock
# RUN git config --global user.email "ludo@huma.net" \
# git config --global user.name "Ludovic CANDELLIER"

View File

@@ -1 +1 @@
deb https://packages.sury.org/php/ bullseye main
deb https://packages.sury.org/php/ bookworm main