From 3d17a13789cb758bc705a1a08405e7ef73567205 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Sun, 21 Mar 2021 19:24:30 +0800 Subject: [PATCH] horizon, php-worker | GnuPG --- laravel-horizon/Dockerfile | 17 +++++++++++++++++ php-worker/Dockerfile | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index 10cf90eb..e35e81e2 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -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 \ diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 0787b7ea..97a5125b 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -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 \