From d68575c3bc62a53bcf8f1bb7b7b49f48192147ba Mon Sep 17 00:00:00 2001 From: telanflow Date: Thu, 8 Jun 2023 01:28:04 +0800 Subject: [PATCH] [fixed] mongodb build version --- README.md | 2 +- build/php56/Dockerfile | 42 +++++++-------- build/php72/Dockerfile | 75 ++++++++++++++++----------- build/php74/Dockerfile | 104 ++++++++++++++++++++++++------------- build/php80/Dockerfile | 110 +++++++++++++++++++++++++-------------- build/php81/Dockerfile | 113 +++++++++++++++++++++++++++-------------- build/php82/Dockerfile | 113 +++++++++++++++++++++++++++-------------- 7 files changed, 358 insertions(+), 201 deletions(-) diff --git a/README.md b/README.md index 9882cb7..efc50d1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

-
DNMP 1.5.0
+
DNMP 1.5

DNMP 可以构建出基于 Docker 的 PHP 开发环境,其优势有在短时间内随意构建不同版本的相关服务、环境统一分布在不同服务器等,使开发者能够更专注于开发业务本身。 diff --git a/build/php56/Dockerfile b/build/php56/Dockerfile index 4846a05..3c6b11f 100644 --- a/build/php56/Dockerfile +++ b/build/php56/Dockerfile @@ -28,7 +28,7 @@ RUN \ fi; \ \ # ⬇ 更新、安装基础组件 - apt-get update && apt-get install -y --no-install-recommends --allow-unauthenticated \ + apt-get update --allow-unauthenticated && apt-get install -y --no-install-recommends --allow-unauthenticated \ wget \ zip \ gzip \ @@ -40,37 +40,34 @@ RUN \ telnet \ openssl \ libssl-dev \ + apt-transport-https \ + ca-certificates \ net-tools ; \ - \ # gd apt-get install -y --allow-unauthenticated \ libfreetype6-dev \ libjpeg62-turbo-dev \ libpng-dev \ + libwebp-dev \ libxpm-dev ; \ - \ + # imagick + apt-get install -y --allow-unauthenticated libmagickwand-dev ; \ # intl - apt-get install -y --allow-unauthenticated icu-devtools libicu-dev zlib1g-dev ; \ - \ + apt-get install -y --allow-unauthenticated icu-devtools libicu-dev ; \ # soap xsl xmlrpc wddx readline apt-get install -y --allow-unauthenticated libxml2-dev libxslt-dev libreadline-dev libedit-dev ; \ - \ # bz2 mcrypt zip apt-get install -y --allow-unauthenticated libbz2-dev libmcrypt-dev libzip-dev; \ - \ # readline snmp apt-get install -y --allow-unauthenticated libreadline-dev libsnmp-dev snmp ; \ - \ + # zstd + apt-get install -y --allow-unauthenticated libzstd-dev ; \ # ldap - apt-get install -y --allow-unauthenticated libldb-dev libldap2-dev ; \ - \ + apt-get install -y --allow-unauthenticated libldb-dev libldap2-dev libldap-common ; \ + # mongodb + apt-get install -y --allow-unauthenticated libsasl2-dev libsnappy-dev zlib1g-dev ; \ # other - # graphicsmagick \ - # libgraphicsmagick1-dev \ - # imagemagick \ - # libmagickwand-dev \ apt-get install -y --allow-unauthenticated \ - libssl-dev \ libmhash-dev \ procps \ libtinfo5 \ @@ -82,7 +79,7 @@ RUN \ #################################################################################### # --with-freetype-dir=/usr/include/freetype2/ \ -RUN docker-php-ext-configure gd --with-xpm-dir=/usr/include/ --with-jpeg-dir=/usr/include/ ; \ +RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-xpm-dir=/usr/include/ --with-jpeg-dir=/usr/include/ ; \ docker-php-ext-install -j$(nproc) gd ; \ \ # readline @@ -90,19 +87,16 @@ RUN docker-php-ext-configure gd --with-xpm-dir=/usr/include/ --with-jpeg-dir=/us docker-php-ext-install readline ; \ \ # 常用扩展 - docker-php-ext-install bcmath mcrypt exif ; \ - \ - # 其他 docker-php-ext-install mysqli \ pdo_mysql \ + pgsql \ + pdo_pgsql \ + bcmath \ bz2 \ calendar \ - exif \ gettext \ pcntl \ - readline \ - pgsql \ - pdo_pgsql \ + mcrypt \ shmop \ sockets \ wddx \ @@ -115,9 +109,9 @@ RUN docker-php-ext-configure gd --with-xpm-dir=/usr/include/ --with-jpeg-dir=/us sysvmsg \ sysvsem \ sysvshm \ + exif \ ldap ; \ # intl - docker-php-ext-configure intl --with-icu-dir=DEFAULT ; \ docker-php-ext-install intl ; \ # \ # ⬇ XDebug diff --git a/build/php72/Dockerfile b/build/php72/Dockerfile index 515fbce..2863039 100644 --- a/build/php72/Dockerfile +++ b/build/php72/Dockerfile @@ -5,7 +5,7 @@ COPY resource /home/resource ARG CHANGE_SOURCE=true ARG TIME_ZONE=UTC -ARG MongoDB=mongodb-1.12.1.tgz +ARG MongoDB=mongodb-1.15.3.tgz ARG OPEN_SWOOLE=openswoole-4.10.0.tgz ARG SWOOLE=swoole-4.8.13.tgz ARG REDIS=redis-5.3.7.tgz @@ -33,9 +33,9 @@ RUN set -eux; \ \ # ⬇ 更新、安装基础组件 apt-get update; \ - apt-get upgrade -y; \ - apt-get install -y --allow-remove-essential --no-install-recommends \ - # tools + apt-get upgrade -y --allow-unauthenticated ; \ + # 基础 + apt-get install -y --allow-remove-essential --no-install-recommends --allow-unauthenticated \ wget \ zip \ unzip \ @@ -44,44 +44,61 @@ RUN set -eux; \ vim \ iputils-ping \ telnet \ - net-tools \ - \ - libmagickwand-dev \ - libz-dev \ + openssl \ + libssl-dev \ + apt-transport-https \ + ca-certificates \ + net-tools ; \ + # gd + apt-get install -y --allow-unauthenticated libfreetype6-dev \ + libjpeg62-turbo-dev \ + libwebp-dev \ + libpng-dev \ + libjpeg-dev \ + libvpx-dev \ + libxpm-dev ; \ + # imagick + apt-get install -y --allow-unauthenticated libmagickwand-dev libgraphicsmagick1-dev ; \ # intl - libicu-dev \ - # bz2 - libbz2-dev \ - # zip - libzip-dev \ + apt-get install -y --allow-unauthenticated libicu-dev libz-dev ; \ + # bz2 zip + apt-get install -y --allow-unauthenticated libbz2-dev libzip-dev zlib1g-dev ; \ + # imap + apt-get install -y --allow-unauthenticated libkrb5-dev ; \ # ldap - libldb-dev \ - libldap2-dev \ + apt-get install -y --allow-unauthenticated libldb-dev libldap2-dev ; \ + # lz4 + apt-get install -y --allow-unauthenticated liblz4-dev ; \ + # snappy + apt-get install -y --allow-unauthenticated libsnappy-dev; \ + # readline snmp + apt-get install -y --allow-unauthenticated libreadline-dev libsnmp-dev snmp ; \ # mcrypt - libmcrypt-dev \ + apt-get install -y --allow-unauthenticated libmcrypt-dev ; \ + # mongodb + apt-get install -y --allow-unauthenticated libicu-dev libsasl2-dev libsnappy-dev zlib1g-dev libsasl2-dev ; \ + # redis + apt-get install -y --allow-unauthenticated libzstd-dev ; \ + # swoole + apt-get install -y --allow-unauthenticated libcurl4-gnutls-dev libpq-dev ; \ + # xmlrpc xsl yaml + apt-get install -y --allow-unauthenticated libxml2-dev libxslt-dev libyaml-dev ; \ # other - libtinfo5 \ - libpq-dev \ - libjpeg-dev \ - libpng-dev \ - libfreetype6-dev \ - libssl-dev \ - libfreetype6-dev \ - libjpeg62-turbo-dev \ - zlib1g-dev \ - libpng-dev \ + apt-get install -y --allow-unauthenticated libtinfo5 \ procps \ libmhash-dev \ librabbitmq-dev \ + uuid-dev \ + libssh2-1-dev \ + libzookeeper-mt-dev \ + libpcre3-dev \ ntpdate ; #################################################################################### # 安装 PHP 扩展 #################################################################################### -RUN docker-php-ext-configure gd \ - --with-freetype-dir=/usr/include/ \ - --with-jpeg-dir=/usr/include/ ; \ +RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ ; \ docker-php-ext-install -j$(nproc) gd intl pdo_mysql ldap mysqli bz2 zip sockets pgsql pdo_pgsql bcmath soap pcntl; \ # \ # ⬇ XDebug diff --git a/build/php74/Dockerfile b/build/php74/Dockerfile index 894536a..63d0987 100644 --- a/build/php74/Dockerfile +++ b/build/php74/Dockerfile @@ -5,7 +5,7 @@ COPY resource /home/resource ARG CHANGE_SOURCE=true ARG TIME_ZONE=UTC -ARG MongoDB=mongodb-1.12.1.tgz +ARG MongoDB=mongodb-1.15.3.tgz ARG OPEN_SWOOLE=openswoole-4.10.0.tgz ARG SWOOLE=swoole-4.8.13.tgz ARG REDIS=redis-5.3.7.tgz @@ -33,9 +33,9 @@ RUN set -eux; \ \ # ⬇ 更新、安装基础组件 apt-get update; \ - apt-get upgrade -y; \ - apt-get install -y --allow-remove-essential --no-install-recommends \ - # tools + apt-get upgrade -y --allow-unauthenticated ; \ + # 基础 + apt-get install -y --allow-remove-essential --no-install-recommends --allow-unauthenticated \ wget \ zip \ unzip \ @@ -44,45 +44,81 @@ RUN set -eux; \ vim \ iputils-ping \ telnet \ - net-tools \ - \ - libmagickwand-dev \ - libz-dev \ + openssl \ + libssl-dev \ + apt-transport-https \ + ca-certificates \ + net-tools ; \ + # gd + apt-get install -y --allow-unauthenticated libfreetype6-dev \ + libjpeg62-turbo-dev \ + libwebp-dev \ + libpng-dev \ + libjpeg-dev \ + libvpx-dev \ + libxpm-dev ; \ + # imagick + apt-get install -y --allow-unauthenticated libmagickwand-dev libgraphicsmagick1-dev ; \ # intl - libicu-dev \ - # bz2 - libbz2-dev \ - # zip - libzip-dev \ + apt-get install -y --allow-unauthenticated libicu-dev libz-dev ; \ + # bz2 zip + apt-get install -y --allow-unauthenticated libbz2-dev libzip-dev zlib1g-dev ; \ + # imap + apt-get install -y --allow-unauthenticated libkrb5-dev ; \ # ldap - libldb-dev \ - libldap2-dev \ + apt-get install -y --allow-unauthenticated libldb-dev libldap2-dev ; \ + # lz4 + apt-get install -y --allow-unauthenticated liblz4-dev ; \ + # snappy + apt-get install -y --allow-unauthenticated libsnappy-dev; \ + # readline snmp + apt-get install -y --allow-unauthenticated libreadline-dev libsnmp-dev snmp ; \ # mcrypt - libmcrypt-dev \ + apt-get install -y --allow-unauthenticated libmcrypt-dev ; \ + # mongodb + apt-get install -y --allow-unauthenticated libicu-dev libsasl2-dev libsnappy-dev zlib1g-dev libsasl2-dev ; \ + # redis + apt-get install -y --allow-unauthenticated libzstd-dev ; \ + # swoole + apt-get install -y --allow-unauthenticated libcurl4-gnutls-dev libpq-dev ; \ + # xmlrpc xsl yaml + apt-get install -y --allow-unauthenticated libxml2-dev libxslt-dev libyaml-dev ; \ # other - libtinfo5 \ - libpq-dev \ - libjpeg-dev \ - libpng-dev \ - libfreetype6-dev \ - libssl-dev \ - libfreetype6-dev \ - libjpeg62-turbo-dev \ - zlib1g-dev \ - libpng-dev \ + apt-get install -y --allow-unauthenticated libtinfo5 \ procps \ libmhash-dev \ librabbitmq-dev \ + uuid-dev \ + libssh2-1-dev \ + libzookeeper-mt-dev \ + libpcre3-dev \ ntpdate ; #################################################################################### # 安装 PHP 扩展 #################################################################################### -RUN docker-php-ext-configure gd \ - --with-freetype-dir=/usr/include/ \ - --with-jpeg-dir=/usr/include/ ; \ - docker-php-ext-install -j$(nproc) gd intl pdo_mysql ldap mysqli bz2 zip sockets pgsql pdo_pgsql bcmath soap pcntl; \ +RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ ; \ + docker-php-ext-install -j$(nproc) gd ; \ + # 常用 + docker-php-ext-install pdo_mysql \ + mysqli \ + pgsql \ + pdo_pgsql \ + bcmath \ + pcntl \ + bz2 \ + zip \ + sockets \ + mbstring \ + gettext \ + calendar \ + exif \ + soap \ + readline \ + ldap; \ + # intl + docker-php-ext-install intl ; \ # \ # ⬇ XDebug # pecl install /home/resource/$XDEBUG ; \ @@ -90,10 +126,6 @@ RUN docker-php-ext-configure gd \ # ⬇ Imagick pecl install imagick && docker-php-ext-enable imagick; \ \ - # ⬇ MongoDB - pecl install /home/resource/$MongoDB ; \ - echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongodb.ini ; \ - \ # ⬇ Redis pecl install /home/resource/$REDIS ; \ echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini ; \ @@ -110,6 +142,10 @@ RUN docker-php-ext-configure gd \ pecl install /home/resource/$MCRYPT ; \ echo "extension=mcrypt.so" > /usr/local/etc/php/conf.d/mcrypt.ini ; \ \ + # ⬇ MongoDB + pecl install /home/resource/$MongoDB ; \ + echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongodb.ini ; \ + \ # ⬇ 清理 rm -rf /var/lib/apt/lists/* ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ; \ diff --git a/build/php80/Dockerfile b/build/php80/Dockerfile index c9ced41..c96e1a5 100644 --- a/build/php80/Dockerfile +++ b/build/php80/Dockerfile @@ -5,7 +5,7 @@ COPY resource /home/resource ARG CHANGE_SOURCE=true ARG TIME_ZONE=UTC -ARG MongoDB=mongodb-1.12.1.tgz +ARG MongoDB=mongodb-1.15.3.tgz ARG OPEN_SWOOLE=openswoole-4.10.0.tgz ARG SWOOLE=swoole-5.0.3.tgz ARG REDIS=redis-5.3.7.tgz @@ -33,9 +33,9 @@ RUN set -eux; \ \ # ⬇ 更新、安装基础组件 apt-get update; \ - apt-get upgrade -y; \ - apt-get install -y --allow-remove-essential --no-install-recommends \ - # tools + apt-get upgrade -y --allow-unauthenticated ; \ + # 基础 + apt-get install -y --allow-remove-essential --no-install-recommends --allow-unauthenticated \ wget \ zip \ unzip \ @@ -44,56 +44,92 @@ RUN set -eux; \ vim \ iputils-ping \ telnet \ - net-tools \ - \ - libmagickwand-dev \ - libz-dev \ + openssl \ + libssl-dev \ + apt-transport-https \ + ca-certificates \ + net-tools ; \ + # gd + apt-get install -y --allow-unauthenticated libfreetype6-dev \ + libjpeg62-turbo-dev \ + libwebp-dev \ + libpng-dev \ + libjpeg-dev \ + libvpx-dev \ + libxpm-dev ; \ + # imagick + apt-get install -y --allow-unauthenticated libmagickwand-dev libgraphicsmagick1-dev ; \ # intl - libicu-dev \ - # bz2 - libbz2-dev \ - # zip - libzip-dev \ + apt-get install -y --allow-unauthenticated libicu-dev libz-dev ; \ + # bz2 zip + apt-get install -y --allow-unauthenticated libbz2-dev libzip-dev zlib1g-dev ; \ + # imap + apt-get install -y --allow-unauthenticated libkrb5-dev ; \ # ldap - libldb-dev \ - libldap2-dev \ + apt-get install -y --allow-unauthenticated libldb-dev libldap2-dev ; \ + # lz4 + apt-get install -y --allow-unauthenticated liblz4-dev ; \ + # snappy + apt-get install -y --allow-unauthenticated libsnappy-dev; \ + # readline snmp + apt-get install -y --allow-unauthenticated libreadline-dev libsnmp-dev snmp ; \ # mcrypt - libmcrypt-dev \ + apt-get install -y --allow-unauthenticated libmcrypt-dev ; \ + # mongodb + apt-get install -y --allow-unauthenticated libicu-dev libsasl2-dev libsnappy-dev zlib1g-dev libsasl2-dev ; \ + # redis + apt-get install -y --allow-unauthenticated libzstd-dev ; \ + # swoole + apt-get install -y --allow-unauthenticated libcurl4-gnutls-dev libpq-dev ; \ + # xmlrpc xsl yaml + apt-get install -y --allow-unauthenticated libxml2-dev libxslt-dev libyaml-dev ; \ # other - libtinfo5 \ - libpq-dev \ - libjpeg-dev \ - libpng-dev \ - libssl-dev \ - libfreetype6-dev \ - libjpeg62-turbo-dev \ - zlib1g-dev \ - libpng-dev \ + apt-get install -y --allow-unauthenticated libtinfo5 \ procps \ libmhash-dev \ librabbitmq-dev \ + uuid-dev \ + libssh2-1-dev \ + libzookeeper-mt-dev \ + libpcre3-dev \ ntpdate ; #################################################################################### # 安装 PHP 扩展 #################################################################################### -RUN docker-php-ext-configure gd \ - --prefix=/usr \ - --with-freetype \ - --with-jpeg ; \ - docker-php-ext-install -j$(nproc) gd intl pdo_mysql ldap mysqli bz2 zip sockets pgsql pdo_pgsql bcmath soap pcntl; \ +RUN docker-php-ext-configure gd --prefix=/usr --with-freetype --with-jpeg ; \ + docker-php-ext-install -j$(nproc) gd ; \ + docker-php-ext-install \ + mysqli \ + pgsql \ + pdo_pgsql \ + pdo_mysql \ + bcmath \ + pcntl \ + bz2 \ + zip \ + mbstring \ + gettext \ + calendar \ + sockets \ + exif \ + shmop \ + soap \ + readline \ + ldap ; \ + # intl + docker-php-ext-install intl ; \ # \ # ⬇ XDebug # pecl install /home/resource/$XDEBUG ; \ \ + # ⬇ Mcrypt + pecl install /home/resource/$MCRYPT ; \ + echo "extension=mcrypt.so" > /usr/local/etc/php/conf.d/mcrypt.ini ; \ # ⬇ Imagick pecl install imagick && docker-php-ext-enable imagick; \ \ - # ⬇ MongoDB - pecl install /home/resource/$MongoDB ; \ - echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongodb.ini ; \ - \ # ⬇ Redis pecl install /home/resource/$REDIS ; \ echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini ; \ @@ -106,9 +142,9 @@ RUN docker-php-ext-configure gd \ pecl install /home/resource/$SWOOLE ; \ echo "extension=swoole.so" > /usr/local/etc/php/conf.d/swoole.ini ; \ \ - # ⬇ Mcrypt - pecl install /home/resource/$MCRYPT ; \ - echo "extension=mcrypt.so" > /usr/local/etc/php/conf.d/mcrypt.ini ; \ + # ⬇ MongoDB + pecl install /home/resource/$MongoDB ; \ + echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongodb.ini ; \ \ # ⬇ 清理 rm -rf /var/lib/apt/lists/* ; \ diff --git a/build/php81/Dockerfile b/build/php81/Dockerfile index ed752b8..2d9b985 100644 --- a/build/php81/Dockerfile +++ b/build/php81/Dockerfile @@ -5,7 +5,7 @@ COPY resource /home/resource ARG CHANGE_SOURCE=true ARG TIME_ZONE=UTC -ARG MongoDB=mongodb-1.12.1.tgz +ARG MongoDB=mongodb-1.15.3.tgz ARG OPEN_SWOOLE=openswoole-4.10.0.tgz ARG SWOOLE=swoole-5.0.3.tgz ARG REDIS=redis-5.3.7.tgz @@ -33,9 +33,9 @@ RUN set -eux; \ \ # ⬇ 更新、安装基础组件 apt-get update; \ - apt-get upgrade -y; \ - apt-get install -y --allow-remove-essential --no-install-recommends \ - # tools + apt-get upgrade -y --allow-unauthenticated ; \ + # 基础 + apt-get install -y --allow-remove-essential --no-install-recommends --allow-unauthenticated \ wget \ zip \ unzip \ @@ -44,57 +44,94 @@ RUN set -eux; \ vim \ iputils-ping \ telnet \ - net-tools \ - \ - libmagickwand-dev \ - libz-dev \ + openssl \ + libssl-dev \ + apt-transport-https \ + ca-certificates \ + net-tools ; \ + # gd + apt-get install -y --allow-unauthenticated libfreetype6-dev \ + libjpeg62-turbo-dev \ + libwebp-dev \ + libpng-dev \ + libjpeg-dev \ + libvpx-dev \ + libxpm-dev ; \ + # imagick + apt-get install -y --allow-unauthenticated libmagickwand-dev libgraphicsmagick1-dev ; \ # intl - libicu-dev \ - # bz2 - libbz2-dev \ - # zip - libzip-dev \ + apt-get install -y --allow-unauthenticated libicu-dev libz-dev ; \ + # bz2 zip + apt-get install -y --allow-unauthenticated libbz2-dev libzip-dev zlib1g-dev ; \ + # imap + apt-get install -y --allow-unauthenticated libkrb5-dev ; \ # ldap - libldb-dev \ - libldap2-dev \ + apt-get install -y --allow-unauthenticated libldb-dev libldap2-dev ; \ + # lz4 + apt-get install -y --allow-unauthenticated liblz4-dev ; \ + # snappy + apt-get install -y --allow-unauthenticated libsnappy-dev; \ + # readline snmp + apt-get install -y --allow-unauthenticated libreadline-dev libsnmp-dev snmp ; \ # mcrypt - libmcrypt-dev \ + apt-get install -y --allow-unauthenticated libmcrypt-dev ; \ + # mongodb + apt-get install -y --allow-unauthenticated libicu-dev libsasl2-dev libsnappy-dev zlib1g-dev libsasl2-dev ; \ + # redis + apt-get install -y --allow-unauthenticated libzstd-dev ; \ + # swoole + apt-get install -y --allow-unauthenticated libcurl4-gnutls-dev libpq-dev ; \ + # xmlrpc xsl yaml + apt-get install -y --allow-unauthenticated libxml2-dev libxslt-dev libyaml-dev ; \ # other - libtinfo5 \ - libpq-dev \ - libjpeg-dev \ - libpng-dev \ - libfreetype6-dev \ - libssl-dev \ - libfreetype6-dev \ - libjpeg62-turbo-dev \ - zlib1g-dev \ - libpng-dev \ + apt-get install -y --allow-unauthenticated libtinfo5 \ procps \ libmhash-dev \ librabbitmq-dev \ + uuid-dev \ + libssh2-1-dev \ + libzookeeper-mt-dev \ + libpcre3-dev \ ntpdate ; #################################################################################### # 安装 PHP 扩展 #################################################################################### -RUN docker-php-ext-configure gd \ - --prefix=/usr \ - --with-freetype \ - --with-jpeg ; \ - docker-php-ext-install -j$(nproc) gd intl pdo_mysql ldap mysqli bz2 zip sockets pgsql pdo_pgsql bcmath soap pcntl; \ +RUN docker-php-ext-configure gd --prefix=/usr --with-freetype --with-jpeg ; \ + docker-php-ext-install -j$(nproc) gd ; \ + # 常用 + docker-php-ext-install pdo_mysql \ + pgsql \ + pdo_pgsql \ + pcntl \ + mysqli \ + bcmath \ + mbstring \ + bz2 \ + zip \ + sockets \ + exif \ + gettext \ + calendar \ + soap \ + xsl \ + shmop \ + readline \ + ldap; \ + # intl + docker-php-ext-install intl ; \ # \ # ⬇ XDebug # pecl install /home/resource/$XDEBUG ; \ \ + # ⬇ Mcrypt + pecl install /home/resource/$MCRYPT ; \ + echo "extension=mcrypt.so" > /usr/local/etc/php/conf.d/mcrypt.ini ; \ + \ # ⬇ Imagick pecl install imagick && docker-php-ext-enable imagick; \ \ - # ⬇ MongoDB - pecl install /home/resource/$MongoDB ; \ - echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongodb.ini ; \ - \ # ⬇ Redis pecl install /home/resource/$REDIS ; \ echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini ; \ @@ -107,9 +144,9 @@ RUN docker-php-ext-configure gd \ pecl install /home/resource/$SWOOLE ; \ echo "extension=swoole.so" > /usr/local/etc/php/conf.d/swoole.ini ; \ \ - # ⬇ Mcrypt - pecl install /home/resource/$MCRYPT ; \ - echo "extension=mcrypt.so" > /usr/local/etc/php/conf.d/mcrypt.ini ; \ + # ⬇ MongoDB + pecl install /home/resource/$MongoDB ; \ + echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongodb.ini ; \ \ # ⬇ 清理 rm -rf /var/lib/apt/lists/* ; \ diff --git a/build/php82/Dockerfile b/build/php82/Dockerfile index 9c885bb..ea673d6 100644 --- a/build/php82/Dockerfile +++ b/build/php82/Dockerfile @@ -5,7 +5,7 @@ COPY resource /home/resource ARG CHANGE_SOURCE=true ARG TIME_ZONE=UTC -ARG MongoDB=mongodb-1.12.1.tgz +ARG MongoDB=mongodb-1.15.3.tgz ARG OPEN_SWOOLE=openswoole-4.10.0.tgz ARG SWOOLE=swoole-5.0.3.tgz ARG REDIS=redis-5.3.7.tgz @@ -33,9 +33,9 @@ RUN set -eux; \ \ # ⬇ 更新、安装基础组件 apt-get update; \ - apt-get upgrade -y; \ - apt-get install -y --allow-remove-essential --no-install-recommends \ - # tools + apt-get upgrade -y --allow-unauthenticated ; \ + # 基础 + apt-get install -y --allow-remove-essential --no-install-recommends --allow-unauthenticated \ wget \ zip \ unzip \ @@ -44,57 +44,94 @@ RUN set -eux; \ vim \ iputils-ping \ telnet \ - net-tools \ - \ - libmagickwand-dev \ - libz-dev \ + openssl \ + libssl-dev \ + apt-transport-https \ + ca-certificates \ + net-tools ; \ + # gd + apt-get install -y --allow-unauthenticated libfreetype6-dev \ + libjpeg62-turbo-dev \ + libwebp-dev \ + libpng-dev \ + libjpeg-dev \ + libvpx-dev \ + libxpm-dev ; \ + # imagick + apt-get install -y --allow-unauthenticated libmagickwand-dev libgraphicsmagick1-dev ; \ # intl - libicu-dev \ - # bz2 - libbz2-dev \ - # zip - libzip-dev \ + apt-get install -y --allow-unauthenticated libicu-dev libz-dev ; \ + # bz2 zip + apt-get install -y --allow-unauthenticated libbz2-dev libzip-dev zlib1g-dev ; \ + # imap + apt-get install -y --allow-unauthenticated libkrb5-dev ; \ # ldap - libldb-dev \ - libldap2-dev \ + apt-get install -y --allow-unauthenticated libldb-dev libldap2-dev ; \ + # lz4 + apt-get install -y --allow-unauthenticated liblz4-dev ; \ + # snappy + apt-get install -y --allow-unauthenticated libsnappy-dev; \ + # readline snmp + apt-get install -y --allow-unauthenticated libreadline-dev libsnmp-dev snmp ; \ # mcrypt - libmcrypt-dev \ + apt-get install -y --allow-unauthenticated libmcrypt-dev ; \ + # mongodb + apt-get install -y --allow-unauthenticated libicu-dev libsasl2-dev libsnappy-dev zlib1g-dev libsasl2-dev ; \ + # redis + apt-get install -y --allow-unauthenticated libzstd-dev ; \ + # swoole + apt-get install -y --allow-unauthenticated libcurl4-gnutls-dev libpq-dev ; \ + # xmlrpc xsl yaml + apt-get install -y --allow-unauthenticated libxml2-dev libxslt-dev libyaml-dev ; \ # other - libtinfo5 \ - libpq-dev \ - libjpeg-dev \ - libpng-dev \ - libfreetype6-dev \ - libssl-dev \ - libfreetype6-dev \ - libjpeg62-turbo-dev \ - zlib1g-dev \ - libpng-dev \ + apt-get install -y --allow-unauthenticated libtinfo5 \ procps \ libmhash-dev \ librabbitmq-dev \ + uuid-dev \ + libssh2-1-dev \ + libzookeeper-mt-dev \ + libpcre3-dev \ ntpdate ; #################################################################################### # 安装 PHP 扩展 #################################################################################### -RUN docker-php-ext-configure gd \ - --prefix=/usr \ - --with-freetype \ - --with-jpeg ; \ - docker-php-ext-install -j$(nproc) gd intl pdo_mysql ldap mysqli bz2 zip sockets pgsql pdo_pgsql bcmath soap pcntl; \ +RUN docker-php-ext-configure gd --prefix=/usr --with-freetype --with-jpeg ; \ + docker-php-ext-install -j$(nproc) gd ; \ + # 常用 + docker-php-ext-install pdo_mysql \ + pgsql \ + pdo_pgsql \ + mysqli \ + bz2 \ + zip \ + sockets \ + bcmath \ + mbstring \ + soap \ + gettext \ + calendar \ + pcntl \ + exif \ + shmop \ + xsl \ + readline \ + ldap; \ + # intl + docker-php-ext-install intl ; \ # \ # ⬇ XDebug # pecl install /home/resource/$XDEBUG ; \ \ + # ⬇ Mcrypt + pecl install /home/resource/$MCRYPT ; \ + echo "extension=mcrypt.so" > /usr/local/etc/php/conf.d/mcrypt.ini ; \ + \ # ⬇ Imagick pecl install imagick && docker-php-ext-enable imagick; \ \ - # ⬇ MongoDB - pecl install /home/resource/$MongoDB ; \ - echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongodb.ini ; \ - \ # ⬇ Redis pecl install /home/resource/$REDIS ; \ echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini ; \ @@ -107,9 +144,9 @@ RUN docker-php-ext-configure gd \ pecl install /home/resource/$SWOOLE ; \ echo "extension=swoole.so" > /usr/local/etc/php/conf.d/swoole.ini ; \ \ - # ⬇ Mcrypt - pecl install /home/resource/$MCRYPT ; \ - echo "extension=mcrypt.so" > /usr/local/etc/php/conf.d/mcrypt.ini ; \ + # ⬇ MongoDB + pecl install /home/resource/$MongoDB ; \ + echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongodb.ini ; \ \ # ⬇ 清理 rm -rf /var/lib/apt/lists/* ; \