From 726211d7d26872e5ddb13c6bca87abf01789893e Mon Sep 17 00:00:00 2001 From: "Leandro F. L." Date: Fri, 9 Aug 2024 00:37:32 -0300 Subject: [PATCH] Updating dockerfiles and entrypoint files according to latest system requirements of adobe commerce (magento open source) on-premises --- magepack/Dockerfile | 2 +- php-fpm/Dockerfile | 2 +- php-fpm/context/docker-entrypoint | 10 +++++++--- php/cli/Dockerfile | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/magepack/Dockerfile b/magepack/Dockerfile index 77cb020..b0b770d 100644 --- a/magepack/Dockerfile +++ b/magepack/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /var/www/html COPY bin/generate.sh /usr/bin/generate COPY bin/bundle.sh /usr/bin/bundle -ARG MAGEPACK_VERSION=2.3 +ARG MAGEPACK_VERSION=2.11 RUN npm install -g magepack@^${MAGEPACK_VERSION} && npm cache clean --force CMD tail -f /dev/null diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index f234dac..d69d712 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -19,7 +19,7 @@ RUN dnf install -y which pv sudo bind-utils python3-pip bash-completion rsync so && dnf clean all \ && rm -rf /var/cache/dnf -ENV NODE_VERSION 18 +ENV NODE_VERSION 20 RUN npm install -g n \ && n install ${NODE_VERSION} \ && rm -rf /usr/local/n/versions/node diff --git a/php-fpm/context/docker-entrypoint b/php-fpm/context/docker-entrypoint index 7045dc0..155ce83 100755 --- a/php-fpm/context/docker-entrypoint +++ b/php-fpm/context/docker-entrypoint @@ -27,12 +27,16 @@ fi sudo crond # Configure composer2 as default when specified -if [[ "${COMPOSER_VERSION:=2}" == "2.2" ]]; then +COMPOSER_VERSION="${COMPOSER_VERSION:=2}" + +if [[ "$COMPOSER_VERSION" =~ ^1(\.[0-9]+){0,2}$ ]]; then + sudo cp /usr/bin/composer1 /usr/bin/composer +elif [[ "$COMPOSER_VERSION" =~ ^2\.2(\.[0-9]+)?$ ]]; then sudo cp /usr/bin/composer2lts /usr/bin/composer -elif [[ "${COMPOSER_VERSION}" == "2" ]]; then +elif [[ "$COMPOSER_VERSION" =~ ^2(\.[0-9]+){0,2}$ ]]; then sudo cp /usr/bin/composer2 /usr/bin/composer else - sudo cp /usr/bin/composer1 /usr/bin/composer + sudo cp /usr/bin/composer2 /usr/bin/composer fi # Resolve permission issues with directories auto-created by volume mounts; to use set CHOWN_DIR_LIST to diff --git a/php/cli/Dockerfile b/php/cli/Dockerfile index 7235550..438df27 100644 --- a/php/cli/Dockerfile +++ b/php/cli/Dockerfile @@ -3,6 +3,7 @@ FROM quay.io/centos/centos:stream9 ARG PHP_VERSION ARG PHP_EXTENSIONS="bcmath cli common gd gmp intl json mbstring \ mcrypt sodium mysqlnd pgsql opcache pdo pdo_pgsql pecl-msgpack pecl-amqp pecl-redis pecl-imagick pecl-zip pecl-swoole process soap xml xmlrpc" +ARG COMPOSER_VERSION=2 RUN dnf update -y \ && dnf clean all \