Merge pull request #2908 from laradock/gnupg

php extension Support GnuPG
This commit is contained in:
Shao Yu-Lung (Allen) 2021-03-21 22:24:59 +08:00 committed by GitHub
commit 51d67e1b35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 69 additions and 1 deletions

View File

@ -23,7 +23,8 @@ jobs:
PHP_VERSION: ${{ matrix.php_version }}
run: |
cp env-example .env
sed -i -- '201,272s/=false/=true/g' .env
sed -i -- '202,274s/=false/=true/g' .env
sed -i -- 's/GNUPG=false/GNUPG=true/g' .env
sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env
sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env
sed -i -- 's/CASSANDRA=true/CASSANDRA=false/g' .env

View File

@ -74,6 +74,7 @@ services:
- INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION}
- INSTALL_BZ2=${WORKSPACE_INSTALL_BZ2}
- INSTALL_GMP=${WORKSPACE_INSTALL_GMP}
- INSTALL_GNUPG=${WORKSPACE_INSTALL_GNUPG}
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
- INSTALL_PCOV=${WORKSPACE_INSTALL_PCOV}
- INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG}
@ -206,6 +207,7 @@ services:
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
- INSTALL_BZ2=${PHP_FPM_INSTALL_BZ2}
- INSTALL_GMP=${PHP_FPM_INSTALL_GMP}
- INSTALL_GNUPG=${PHP_FPM_INSTALL_GNUPG}
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
- INSTALL_PCOV=${PHP_FPM_INSTALL_PCOV}
- INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG}
@ -307,6 +309,7 @@ services:
- INSTALL_GD=${PHP_WORKER_INSTALL_GD}
- INSTALL_IMAGEMAGICK=${PHP_WORKER_INSTALL_IMAGEMAGICK}
- INSTALL_GMP=${PHP_WORKER_INSTALL_GMP}
- INSTALL_GNUPG=${PHP_WORKER_INSTALL_GNUPG}
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
- INSTALL_MONGO=${PHP_WORKER_INSTALL_MONGO}
- INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH}
@ -348,6 +351,7 @@ services:
- INSTALL_BZ2=${LARAVEL_HORIZON_INSTALL_BZ2}
- INSTALL_GD=${LARAVEL_HORIZON_INSTALL_GD}
- INSTALL_GMP=${LARAVEL_HORIZON_INSTALL_GMP}
- INSTALL_GNUPG=${LARAVEL_HORIZON_INSTALL_GNUPG}
- INSTALL_IMAGEMAGICK=${LARAVEL_HORIZON_INSTALL_IMAGEMAGICK}
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
- INSTALL_ZIP_ARCHIVE=${LARAVEL_HORIZON_INSTALL_ZIP_ARCHIVE}

View File

@ -123,6 +123,7 @@ WORKSPACE_INSTALL_WORKSPACE_SSH=false
WORKSPACE_INSTALL_SUBVERSION=false
WORKSPACE_INSTALL_BZ2=false
WORKSPACE_INSTALL_GMP=false
WORKSPACE_INSTALL_GNUPG=false
WORKSPACE_INSTALL_XDEBUG=false
WORKSPACE_INSTALL_PCOV=false
WORKSPACE_INSTALL_PHPDBG=false
@ -212,6 +213,7 @@ PHP_FPM_INSTALL_PHPREDIS=true
PHP_FPM_INSTALL_MEMCACHED=false
PHP_FPM_INSTALL_BZ2=false
PHP_FPM_INSTALL_GMP=false
PHP_FPM_INSTALL_GNUPG=false
PHP_FPM_INSTALL_XDEBUG=false
PHP_FPM_INSTALL_PCOV=false
PHP_FPM_INSTALL_XHPROF=false
@ -277,6 +279,7 @@ PHP_WORKER_INSTALL_GD=false
PHP_WORKER_INSTALL_IMAGEMAGICK=false
PHP_WORKER_IMAGEMAGICK_VERSION=latest
PHP_WORKER_INSTALL_GMP=false
PHP_WORKER_INSTALL_GNUPG=false
PHP_WORKER_INSTALL_PGSQL=false
PHP_WORKER_INSTALL_MONGO=false
PHP_WORKER_INSTALL_BCMATH=false
@ -316,6 +319,7 @@ NGINX_SSL_PATH=./nginx/ssl/
LARAVEL_HORIZON_INSTALL_BZ2=false
LARAVEL_HORIZON_INSTALL_GD=false
LARAVEL_HORIZON_INSTALL_GMP=false
LARAVEL_HORIZON_INSTALL_GNUPG=false
LARAVEL_HORIZON_INSTALL_IMAGEMAGICK=false
LARAVEL_HORIZON_IMAGEMAGICK_VERSION=latest
LARAVEL_HORIZON_INSTALL_SOCKETS=false

View File

@ -57,6 +57,23 @@ RUN if [ ${INSTALL_BZ2} = true ]; then \
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; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
pecl install gnupg-1.5.0RC2; \
else \
pecl install gnupg; \
fi; \
docker-php-ext-enable gnupg; \
fi
#Install GD package:
ARG INSTALL_GD=false
RUN if [ ${INSTALL_GD} = true ]; then \

View File

@ -96,6 +96,21 @@ RUN if [ ${INSTALL_GMP} = true ]; then \
docker-php-ext-install gmp \
;fi
###########################################################################
# GnuPG:
###########################################################################
ARG INSTALL_GNUPG=false
RUN if [ ${INSTALL_GNUPG} = true ]; then \
apt-get -yq install libgpgme-dev; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
pecl install gnupg-1.5.0RC2; \
else \
pecl install gnupg; \
fi; \
fi
###########################################################################
# SSH2:
###########################################################################

View File

@ -59,6 +59,23 @@ RUN if [ ${INSTALL_BZ2} = true ]; then \
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; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
pecl install gnupg-1.5.0RC2; \
else \
pecl install gnupg; \
fi; \
docker-php-ext-enable gnupg; \
fi
#Install GD package:
ARG INSTALL_GD=false
RUN if [ ${INSTALL_GD} = true ]; then \

View File

@ -270,6 +270,16 @@ RUN if [ ${INSTALL_GMP} = true ]; then \
apt-get -y install php${LARADOCK_PHP_VERSION}-gmp \
;fi
###########################################################################
# GnuPG:
###########################################################################
ARG INSTALL_GNUPG=false
RUN if [ ${INSTALL_GNUPG} = true ]; then \
apt-get install -yqq php${LARADOCK_PHP_VERSION}-gnupg; \
fi
###########################################################################
# SSH2:
###########################################################################