From 4484fc98500b87bda49eeb7e5643006dbe617e50 Mon Sep 17 00:00:00 2001 From: Bohdan Korablov Date: Sun, 24 Apr 2022 00:46:14 -0500 Subject: [PATCH 1/6] MCLOUD-8643: Mailhog not catching emails in v1.3.0 / 1.3.1 (#92) --- src/Compose/DeveloperBuilder.php | 16 ++++++++++++---- .../cloud_base_developer/docker-compose.exp.yml | 1 + .../docker-compose.exp.yml | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/Compose/DeveloperBuilder.php b/src/Compose/DeveloperBuilder.php index 84db48e6..8e2f9874 100644 --- a/src/Compose/DeveloperBuilder.php +++ b/src/Compose/DeveloperBuilder.php @@ -12,6 +12,7 @@ use Magento\CloudDocker\Config\Config; use Magento\CloudDocker\Config\Environment\Converter; use Magento\CloudDocker\Filesystem\FileList; +use Magento\CloudDocker\Service\ServiceInterface; /** * Developer compose configuration. @@ -149,11 +150,18 @@ public function build(Config $config): Manager $dbVolumes ) ]); + + $variables = [ + 'MAGENTO_RUN_MODE' => 'developer', + 'PHP_EXTENSIONS' => implode(' ', $this->extensionResolver->get($config)) + ]; + + if ($config->hasServiceEnabled(ServiceInterface::SERVICE_MAILHOG)) { + $variables['SENDMAIL_PATH'] = '/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025'; + } + $manager->updateService(self::SERVICE_GENERIC, [ - 'environment' => $this->converter->convert(array_merge( - ['MAGENTO_RUN_MODE' => 'developer'], - ['PHP_EXTENSIONS' => implode(' ', $this->extensionResolver->get($config))] - )) + 'environment' => $this->converter->convert($variables) ]); return $manager; diff --git a/src/Test/Integration/_files/cloud_base_developer/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_developer/docker-compose.exp.yml index 9265d881..230bf9f3 100644 --- a/src/Test/Integration/_files/cloud_base_developer/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_developer/docker-compose.exp.yml @@ -147,6 +147,7 @@ services: environment: - MAGENTO_RUN_MODE=developer - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium redis' + - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.docker image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' diff --git a/src/Test/Integration/_files/cloud_base_developer_manual/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_developer_manual/docker-compose.exp.yml index e0dc3ac9..55b2f9d2 100644 --- a/src/Test/Integration/_files/cloud_base_developer_manual/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_developer_manual/docker-compose.exp.yml @@ -127,6 +127,7 @@ services: environment: - MAGENTO_RUN_MODE=developer - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium redis' + - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.docker image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' From e7b85a326a342f1f4e2157c2f6cda771757ccdae Mon Sep 17 00:00:00 2001 From: Bohdan Korablov Date: Wed, 11 May 2022 22:06:13 -0500 Subject: [PATCH 2/6] Small fix init-docker.sh (#94) --- bin/init-docker.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/bin/init-docker.sh b/bin/init-docker.sh index ff79ffc5..56dce851 100755 --- a/bin/init-docker.sh +++ b/bin/init-docker.sh @@ -38,13 +38,20 @@ parse_bool_flag() esac } -version_is_valid() +php_version_is_valid() { if [[ ! $OPTARG =~ ^[0-9]+\.[0-9]+$ ]]; then die "Invalid version number $OPTARG for $OPT" fi } +image_version_is_valid() +{ + if [[ ! $OPTARG =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + die "Invalid version number $OPTARG for $OPT" + fi +} + domain_is_valid() { # Check that a flag isn't being interpreted as the domain @@ -70,7 +77,7 @@ add_host() } PHP_VERSION="7.4" -IMAGE_VERSION="1.2.1" +IMAGE_VERSION="1.3.2" ADD_HOST=true DOMAIN="magento2.docker" USAGE="Init Docker @@ -100,13 +107,13 @@ while getopts "hp:i:-:" OPT; do case "$OPT" in p | php ) needs_arg "$@" - version_is_valid + php_version_is_valid PHP_VERSION="$OPTARG" ;; i | image ) needs_arg "$@" - version_is_valid + image_version_is_valid IMAGE_VERSION="$OPTARG" ;; From 8f4a804815d87894c021945a4a3871fc7ac2afcd Mon Sep 17 00:00:00 2001 From: Bohdan Korablov Date: Thu, 19 May 2022 14:09:44 -0500 Subject: [PATCH 3/6] MCLOUD-7989: No ARM images available for development on Macbook Pro M1 CPU (#63) --- images/mailhog/1.0/Dockerfile | 29 +++++++++++ images/php/7.2-cli/Dockerfile | 41 +++++++++------- images/php/7.2-fpm/Dockerfile | 39 +++++++++------ images/php/7.3-cli/Dockerfile | 41 +++++++++------- images/php/7.3-fpm/Dockerfile | 39 +++++++++------ images/php/7.4-cli/Dockerfile | 41 +++++++++------- images/php/7.4-fpm/Dockerfile | 39 +++++++++------ images/php/8.0-cli/Dockerfile | 34 ++++++++----- images/php/8.0-fpm/Dockerfile | 32 ++++++++----- images/php/8.1-cli/Dockerfile | 39 ++++++++++----- images/php/8.1-fpm/Dockerfile | 37 +++++++++----- images/php/cli/Dockerfile | 18 +++++-- images/php/fpm/Dockerfile | 16 +++++-- src/Command/Image/GeneratePhp.php | 4 +- src/Compose/Php/ExtensionResolver.php | 48 ++++++++++++++----- src/Service/ServiceFactory.php | 8 ++-- .../Functional/Acceptance/Services72Cest.php | 8 ++-- .../Functional/Acceptance/ServicesCest.php | 8 ++-- .../_files/cloud_base/docker-compose.exp.yml | 4 +- .../docker-compose.exp.yml | 4 +- .../docker-compose.exp.yml | 4 +- .../cloud_base_mftf/docker-compose.exp.yml | 2 +- .../cloud_base_test/docker-compose.exp.yml | 2 +- .../docker-compose.exp.yml | 4 +- .../docker-compose.exp.yml | 4 +- .../docker-compose.exp.yml | 4 +- .../docker-compose.exp.yml | 4 +- .../docker-compose.exp.yml | 2 +- .../docker-compose.exp.yml | 2 +- .../custom_cloud_base/docker-compose.exp.yml | 4 +- .../docker-compose.exp.yml | 4 +- .../docker-compose.exp.yml | 2 +- .../docker-compose.exp.yml | 2 +- .../custom_registry/docker-compose.exp.yml | 4 +- 34 files changed, 369 insertions(+), 204 deletions(-) create mode 100644 images/mailhog/1.0/Dockerfile diff --git a/images/mailhog/1.0/Dockerfile b/images/mailhog/1.0/Dockerfile new file mode 100644 index 00000000..f7d70d66 --- /dev/null +++ b/images/mailhog/1.0/Dockerfile @@ -0,0 +1,29 @@ +# +# MailHog Dockerfile +# + +FROM golang:1.17.9-alpine + +# Install MailHog: +RUN apk --no-cache add --virtual build-dependencies \ + git \ + && mkdir -p /root/gocode \ + && export GOPATH=/root/gocode \ + && go get github.com/mailhog/MailHog@v1.0.1 \ + && mv /root/gocode/bin/MailHog /usr/local/bin \ + && rm -rf /root/gocode \ + && apk del --purge build-dependencies + +# Add mailhog user/group with uid/gid 1000. +# This is a workaround for boot2docker issue #581, see +# https://github.com/boot2docker/boot2docker/issues/581 +RUN adduser -D -u 1000 mailhog + +USER mailhog + +WORKDIR /home/mailhog + +ENTRYPOINT ["MailHog"] + +# Expose the SMTP and HTTP ports: +EXPOSE 1025 8025 diff --git a/images/php/7.2-cli/Dockerfile b/images/php/7.2-cli/Dockerfile index b36cb7dc..168b79c3 100644 --- a/images/php/7.2-cli/Dockerfile +++ b/images/php/7.2-cli/Dockerfile @@ -1,4 +1,15 @@ # This file is automatically generated. Do not edit directly. # +FROM golang:1.15 AS builder + +RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ + && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ + && tar -xf mhsendmail.tar.gz \ + && mkdir -p ./src/github.com/mailhog/ \ + && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ + && cd ./src/github.com/mailhog/mhsendmail/ \ + && go get . \ + && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . + FROM php:7.2-cli ARG COMPOSER_VERSION=1.10.22 @@ -75,17 +86,14 @@ RUN pip3 install --upgrade setuptools \ RUN npm install -g grunt-cli # Install MailHog -RUN curl -L -O https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ - && sudo chmod +x mhsendmail_linux_amd64 \ - && sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail +COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ +RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library RUN docker-php-ext-configure \ gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ RUN docker-php-ext-configure \ imap --with-kerberos --with-imap-ssl -RUN docker-php-ext-configure \ - ldap --with-libdir=lib/x86_64-linux-gnu RUN docker-php-ext-configure \ opcache --enable-opcache RUN docker-php-ext-configure \ @@ -102,7 +110,6 @@ RUN docker-php-ext-install -j$(nproc) \ gmp \ imap \ intl \ - ldap \ mysqli \ opcache \ pdo_mysql \ @@ -136,12 +143,13 @@ RUN pecl install -o -f \ xdebug-3.1.2 \ yaml -RUN curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ - && mkdir -p /tmp/blackfire \ - && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ - && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && echo blackfire.agent_socket=tcp://blackfire:8707 > $(php -i | grep "additional .ini" | awk '{print $9}')/blackfire.ini \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz +RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ + && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ + && apt-get update \ + && apt-get install blackfire-php \ + && rm -rf /var/lib/apt/lists/* +RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ + && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} RUN mkdir -p /tmp/zoo \ && cd /tmp/zoo \ && git clone https://github.com/php-zookeeper/php-zookeeper.git \ @@ -172,13 +180,14 @@ RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && rm -rf /tmp/libsodium \ && pecl install -o -f libsodium RUN cd /tmp \ - && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \ - && tar zxvf ioncube_loaders_lin_x86-64.tar.gz \ + && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ + && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ + && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ && export PHP_EXT_DIR=$(php-config --extension-dir) \ && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ && rm -rf ./ioncube \ - && rm ioncube_loaders_lin_x86-64.tar.gz + && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz ADD etc/php-cli.ini /usr/local/etc/php/conf.d/zz-magento.ini ADD etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini @@ -213,7 +222,7 @@ RUN mkdir -p ${MAGENTO_ROOT} VOLUME ${MAGENTO_ROOT} RUN chown -R www:www /usr/local /var/www /var/log /usr/local/etc/php/conf.d /etc/cron.d ${MAGENTO_ROOT} ${COMPOSER_HOME} -RUN if [[ ! -z "${CRONTAB}" ]]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi +RUN if [ ! -z "${CRONTAB}" ]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/images/php/7.2-fpm/Dockerfile b/images/php/7.2-fpm/Dockerfile index d37fb801..e78aff37 100644 --- a/images/php/7.2-fpm/Dockerfile +++ b/images/php/7.2-fpm/Dockerfile @@ -1,4 +1,15 @@ # This file is automatically generated. Do not edit directly. # +FROM golang:1.15 AS builder + +RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ + && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ + && tar -xf mhsendmail.tar.gz \ + && mkdir -p ./src/github.com/mailhog/ \ + && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ + && cd ./src/github.com/mailhog/mhsendmail/ \ + && go get . \ + && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . + FROM php:7.2-fpm ARG MAGENTO_ROOT=/app @@ -50,17 +61,14 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install MailHog -RUN curl -L -O https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ - && sudo chmod +x mhsendmail_linux_amd64 \ - && sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail +COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ +RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library RUN docker-php-ext-configure \ gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ RUN docker-php-ext-configure \ imap --with-kerberos --with-imap-ssl -RUN docker-php-ext-configure \ - ldap --with-libdir=lib/x86_64-linux-gnu RUN docker-php-ext-configure \ opcache --enable-opcache RUN docker-php-ext-configure \ @@ -77,7 +85,6 @@ RUN docker-php-ext-install -j$(nproc) \ gmp \ imap \ intl \ - ldap \ mysqli \ opcache \ pdo_mysql \ @@ -111,12 +118,13 @@ RUN pecl install -o -f \ xdebug-3.1.2 \ yaml -RUN curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ - && mkdir -p /tmp/blackfire \ - && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ - && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && echo blackfire.agent_socket=tcp://blackfire:8707 > $(php -i | grep "additional .ini" | awk '{print $9}')/blackfire.ini \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz +RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ + && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ + && apt-get update \ + && apt-get install blackfire-php \ + && rm -rf /var/lib/apt/lists/* +RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ + && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} RUN mkdir -p /tmp/zoo \ && cd /tmp/zoo \ && git clone https://github.com/php-zookeeper/php-zookeeper.git \ @@ -147,13 +155,14 @@ RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && rm -rf /tmp/libsodium \ && pecl install -o -f libsodium RUN cd /tmp \ - && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \ - && tar zxvf ioncube_loaders_lin_x86-64.tar.gz \ + && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ + && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ + && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ && export PHP_EXT_DIR=$(php-config --extension-dir) \ && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ && rm -rf ./ioncube \ - && rm ioncube_loaders_lin_x86-64.tar.gz + && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz COPY etc/php-fpm.ini /usr/local/etc/php/conf.d/zz-magento.ini COPY etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini diff --git a/images/php/7.3-cli/Dockerfile b/images/php/7.3-cli/Dockerfile index 47d7e589..194647fd 100644 --- a/images/php/7.3-cli/Dockerfile +++ b/images/php/7.3-cli/Dockerfile @@ -1,4 +1,15 @@ # This file is automatically generated. Do not edit directly. # +FROM golang:1.15 AS builder + +RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ + && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ + && tar -xf mhsendmail.tar.gz \ + && mkdir -p ./src/github.com/mailhog/ \ + && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ + && cd ./src/github.com/mailhog/mhsendmail/ \ + && go get . \ + && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . + FROM php:7.3-cli ARG COMPOSER_VERSION=1.10.22 @@ -73,17 +84,14 @@ RUN pip3 install --upgrade setuptools \ RUN npm install -g grunt-cli # Install MailHog -RUN curl -L -O https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ - && sudo chmod +x mhsendmail_linux_amd64 \ - && sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail +COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ +RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library RUN docker-php-ext-configure \ gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ RUN docker-php-ext-configure \ imap --with-kerberos --with-imap-ssl -RUN docker-php-ext-configure \ - ldap --with-libdir=lib/x86_64-linux-gnu RUN docker-php-ext-configure \ opcache --enable-opcache RUN docker-php-ext-configure \ @@ -100,7 +108,6 @@ RUN docker-php-ext-install -j$(nproc) \ gmp \ imap \ intl \ - ldap \ mysqli \ opcache \ pdo_mysql \ @@ -133,12 +140,13 @@ RUN pecl install -o -f \ xdebug-3.1.2 \ yaml -RUN curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ - && mkdir -p /tmp/blackfire \ - && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ - && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && echo blackfire.agent_socket=tcp://blackfire:8707 > $(php -i | grep "additional .ini" | awk '{print $9}')/blackfire.ini \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz +RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ + && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ + && apt-get update \ + && apt-get install blackfire-php \ + && rm -rf /var/lib/apt/lists/* +RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ + && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} RUN mkdir -p /tmp/zoo \ && cd /tmp/zoo \ && git clone https://github.com/php-zookeeper/php-zookeeper.git \ @@ -169,13 +177,14 @@ RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && rm -rf /tmp/libsodium \ && pecl install -o -f libsodium RUN cd /tmp \ - && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \ - && tar zxvf ioncube_loaders_lin_x86-64.tar.gz \ + && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ + && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ + && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ && export PHP_EXT_DIR=$(php-config --extension-dir) \ && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ && rm -rf ./ioncube \ - && rm ioncube_loaders_lin_x86-64.tar.gz + && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz ADD etc/php-cli.ini /usr/local/etc/php/conf.d/zz-magento.ini ADD etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini @@ -210,7 +219,7 @@ RUN mkdir -p ${MAGENTO_ROOT} VOLUME ${MAGENTO_ROOT} RUN chown -R www:www /usr/local /var/www /var/log /usr/local/etc/php/conf.d /etc/cron.d ${MAGENTO_ROOT} ${COMPOSER_HOME} -RUN if [[ ! -z "${CRONTAB}" ]]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi +RUN if [ ! -z "${CRONTAB}" ]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/images/php/7.3-fpm/Dockerfile b/images/php/7.3-fpm/Dockerfile index d6a3389b..7090b32e 100644 --- a/images/php/7.3-fpm/Dockerfile +++ b/images/php/7.3-fpm/Dockerfile @@ -1,4 +1,15 @@ # This file is automatically generated. Do not edit directly. # +FROM golang:1.15 AS builder + +RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ + && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ + && tar -xf mhsendmail.tar.gz \ + && mkdir -p ./src/github.com/mailhog/ \ + && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ + && cd ./src/github.com/mailhog/mhsendmail/ \ + && go get . \ + && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . + FROM php:7.3-fpm ARG MAGENTO_ROOT=/app @@ -48,17 +59,14 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install MailHog -RUN curl -L -O https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ - && sudo chmod +x mhsendmail_linux_amd64 \ - && sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail +COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ +RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library RUN docker-php-ext-configure \ gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ RUN docker-php-ext-configure \ imap --with-kerberos --with-imap-ssl -RUN docker-php-ext-configure \ - ldap --with-libdir=lib/x86_64-linux-gnu RUN docker-php-ext-configure \ opcache --enable-opcache RUN docker-php-ext-configure \ @@ -75,7 +83,6 @@ RUN docker-php-ext-install -j$(nproc) \ gmp \ imap \ intl \ - ldap \ mysqli \ opcache \ pdo_mysql \ @@ -108,12 +115,13 @@ RUN pecl install -o -f \ xdebug-3.1.2 \ yaml -RUN curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ - && mkdir -p /tmp/blackfire \ - && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ - && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && echo blackfire.agent_socket=tcp://blackfire:8707 > $(php -i | grep "additional .ini" | awk '{print $9}')/blackfire.ini \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz +RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ + && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ + && apt-get update \ + && apt-get install blackfire-php \ + && rm -rf /var/lib/apt/lists/* +RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ + && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} RUN mkdir -p /tmp/zoo \ && cd /tmp/zoo \ && git clone https://github.com/php-zookeeper/php-zookeeper.git \ @@ -144,13 +152,14 @@ RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && rm -rf /tmp/libsodium \ && pecl install -o -f libsodium RUN cd /tmp \ - && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \ - && tar zxvf ioncube_loaders_lin_x86-64.tar.gz \ + && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ + && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ + && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ && export PHP_EXT_DIR=$(php-config --extension-dir) \ && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ && rm -rf ./ioncube \ - && rm ioncube_loaders_lin_x86-64.tar.gz + && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz COPY etc/php-fpm.ini /usr/local/etc/php/conf.d/zz-magento.ini COPY etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini diff --git a/images/php/7.4-cli/Dockerfile b/images/php/7.4-cli/Dockerfile index f70a3f74..2aa88ff6 100644 --- a/images/php/7.4-cli/Dockerfile +++ b/images/php/7.4-cli/Dockerfile @@ -1,4 +1,15 @@ # This file is automatically generated. Do not edit directly. # +FROM golang:1.15 AS builder + +RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ + && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ + && tar -xf mhsendmail.tar.gz \ + && mkdir -p ./src/github.com/mailhog/ \ + && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ + && cd ./src/github.com/mailhog/mhsendmail/ \ + && go get . \ + && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . + FROM php:7.4-cli ARG COMPOSER_VERSION=1.10.22 @@ -69,15 +80,12 @@ RUN pip3 install --upgrade setuptools \ RUN npm install -g grunt-cli # Install MailHog -RUN curl -L -O https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ - && sudo chmod +x mhsendmail_linux_amd64 \ - && sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail +COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ +RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library RUN docker-php-ext-configure \ gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ -RUN docker-php-ext-configure \ - ldap --with-libdir=lib/x86_64-linux-gnu RUN docker-php-ext-configure \ opcache --enable-opcache @@ -91,7 +99,6 @@ RUN docker-php-ext-install -j$(nproc) \ gettext \ gmp \ intl \ - ldap \ mysqli \ opcache \ pdo_mysql \ @@ -123,12 +130,13 @@ RUN pecl install -o -f \ xdebug-3.1.2 \ yaml -RUN curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ - && mkdir -p /tmp/blackfire \ - && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ - && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && echo blackfire.agent_socket=tcp://blackfire:8707 > $(php -i | grep "additional .ini" | awk '{print $9}')/blackfire.ini \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz +RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ + && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ + && apt-get update \ + && apt-get install blackfire-php \ + && rm -rf /var/lib/apt/lists/* +RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ + && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} RUN mkdir -p /tmp/zoo \ && cd /tmp/zoo \ && git clone https://github.com/php-zookeeper/php-zookeeper.git \ @@ -159,13 +167,14 @@ RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && rm -rf /tmp/libsodium \ && pecl install -o -f libsodium RUN cd /tmp \ - && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \ - && tar zxvf ioncube_loaders_lin_x86-64.tar.gz \ + && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ + && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ + && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ && export PHP_EXT_DIR=$(php-config --extension-dir) \ && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ && rm -rf ./ioncube \ - && rm ioncube_loaders_lin_x86-64.tar.gz + && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz ADD etc/php-cli.ini /usr/local/etc/php/conf.d/zz-magento.ini ADD etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini @@ -200,7 +209,7 @@ RUN mkdir -p ${MAGENTO_ROOT} VOLUME ${MAGENTO_ROOT} RUN chown -R www:www /usr/local /var/www /var/log /usr/local/etc/php/conf.d /etc/cron.d ${MAGENTO_ROOT} ${COMPOSER_HOME} -RUN if [[ ! -z "${CRONTAB}" ]]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi +RUN if [ ! -z "${CRONTAB}" ]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/images/php/7.4-fpm/Dockerfile b/images/php/7.4-fpm/Dockerfile index 23cc3313..c757d68d 100644 --- a/images/php/7.4-fpm/Dockerfile +++ b/images/php/7.4-fpm/Dockerfile @@ -1,4 +1,15 @@ # This file is automatically generated. Do not edit directly. # +FROM golang:1.15 AS builder + +RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ + && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ + && tar -xf mhsendmail.tar.gz \ + && mkdir -p ./src/github.com/mailhog/ \ + && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ + && cd ./src/github.com/mailhog/mhsendmail/ \ + && go get . \ + && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . + FROM php:7.4-fpm ARG MAGENTO_ROOT=/app @@ -44,15 +55,12 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install MailHog -RUN curl -L -O https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ - && sudo chmod +x mhsendmail_linux_amd64 \ - && sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail +COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ +RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library RUN docker-php-ext-configure \ gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ -RUN docker-php-ext-configure \ - ldap --with-libdir=lib/x86_64-linux-gnu RUN docker-php-ext-configure \ opcache --enable-opcache @@ -66,7 +74,6 @@ RUN docker-php-ext-install -j$(nproc) \ gettext \ gmp \ intl \ - ldap \ mysqli \ opcache \ pdo_mysql \ @@ -98,12 +105,13 @@ RUN pecl install -o -f \ xdebug-3.1.2 \ yaml -RUN curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ - && mkdir -p /tmp/blackfire \ - && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ - && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && echo blackfire.agent_socket=tcp://blackfire:8707 > $(php -i | grep "additional .ini" | awk '{print $9}')/blackfire.ini \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz +RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ + && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ + && apt-get update \ + && apt-get install blackfire-php \ + && rm -rf /var/lib/apt/lists/* +RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ + && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} RUN mkdir -p /tmp/zoo \ && cd /tmp/zoo \ && git clone https://github.com/php-zookeeper/php-zookeeper.git \ @@ -134,13 +142,14 @@ RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && rm -rf /tmp/libsodium \ && pecl install -o -f libsodium RUN cd /tmp \ - && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \ - && tar zxvf ioncube_loaders_lin_x86-64.tar.gz \ + && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ + && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ + && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ && export PHP_EXT_DIR=$(php-config --extension-dir) \ && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ && rm -rf ./ioncube \ - && rm ioncube_loaders_lin_x86-64.tar.gz + && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz COPY etc/php-fpm.ini /usr/local/etc/php/conf.d/zz-magento.ini COPY etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini diff --git a/images/php/8.0-cli/Dockerfile b/images/php/8.0-cli/Dockerfile index 54c0367b..90cf119d 100644 --- a/images/php/8.0-cli/Dockerfile +++ b/images/php/8.0-cli/Dockerfile @@ -1,4 +1,15 @@ # This file is automatically generated. Do not edit directly. # +FROM golang:1.15 AS builder + +RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ + && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ + && tar -xf mhsendmail.tar.gz \ + && mkdir -p ./src/github.com/mailhog/ \ + && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ + && cd ./src/github.com/mailhog/mhsendmail/ \ + && go get . \ + && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . + FROM php:8.0.14-cli ARG COMPOSER_VERSION=2.1.14 @@ -66,15 +77,12 @@ RUN pip3 install --upgrade setuptools \ RUN npm install -g grunt-cli # Install MailHog -RUN curl -L -O https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ - && sudo chmod +x mhsendmail_linux_amd64 \ - && sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail +COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ +RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library RUN docker-php-ext-configure \ gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ -RUN docker-php-ext-configure \ - ldap --with-libdir=lib/x86_64-linux-gnu RUN docker-php-ext-configure \ opcache --enable-opcache @@ -88,7 +96,6 @@ RUN docker-php-ext-install -j$(nproc) \ gettext \ gmp \ intl \ - ldap \ mysqli \ opcache \ pdo_mysql \ @@ -116,12 +123,13 @@ RUN pecl install -o -f \ xmlrpc-1.0.0RC3 \ yaml -RUN curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ - && mkdir -p /tmp/blackfire \ - && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ - && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && echo blackfire.agent_socket=tcp://blackfire:8707 > $(php -i | grep "additional .ini" | awk '{print $9}')/blackfire.ini \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz +RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ + && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ + && apt-get update \ + && apt-get install blackfire-php \ + && rm -rf /var/lib/apt/lists/* +RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ + && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} RUN mkdir -p /tmp/zoo \ && cd /tmp/zoo \ && git clone https://github.com/php-zookeeper/php-zookeeper.git \ @@ -185,7 +193,7 @@ RUN mkdir -p ${MAGENTO_ROOT} VOLUME ${MAGENTO_ROOT} RUN chown -R www:www /usr/local /var/www /var/log /usr/local/etc/php/conf.d /etc/cron.d ${MAGENTO_ROOT} ${COMPOSER_HOME} -RUN if [[ ! -z "${CRONTAB}" ]]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi +RUN if [ ! -z "${CRONTAB}" ]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/images/php/8.0-fpm/Dockerfile b/images/php/8.0-fpm/Dockerfile index 12d2b7a5..06f0f505 100644 --- a/images/php/8.0-fpm/Dockerfile +++ b/images/php/8.0-fpm/Dockerfile @@ -1,4 +1,15 @@ # This file is automatically generated. Do not edit directly. # +FROM golang:1.15 AS builder + +RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ + && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ + && tar -xf mhsendmail.tar.gz \ + && mkdir -p ./src/github.com/mailhog/ \ + && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ + && cd ./src/github.com/mailhog/mhsendmail/ \ + && go get . \ + && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . + FROM php:8.0.14-fpm ARG MAGENTO_ROOT=/app @@ -41,15 +52,12 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install MailHog -RUN curl -L -O https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ - && sudo chmod +x mhsendmail_linux_amd64 \ - && sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail +COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ +RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library RUN docker-php-ext-configure \ gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ -RUN docker-php-ext-configure \ - ldap --with-libdir=lib/x86_64-linux-gnu RUN docker-php-ext-configure \ opcache --enable-opcache @@ -63,7 +71,6 @@ RUN docker-php-ext-install -j$(nproc) \ gettext \ gmp \ intl \ - ldap \ mysqli \ opcache \ pdo_mysql \ @@ -91,12 +98,13 @@ RUN pecl install -o -f \ xmlrpc-1.0.0RC3 \ yaml -RUN curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ - && mkdir -p /tmp/blackfire \ - && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ - && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && echo blackfire.agent_socket=tcp://blackfire:8707 > $(php -i | grep "additional .ini" | awk '{print $9}')/blackfire.ini \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz +RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ + && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ + && apt-get update \ + && apt-get install blackfire-php \ + && rm -rf /var/lib/apt/lists/* +RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ + && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} RUN mkdir -p /tmp/zoo \ && cd /tmp/zoo \ && git clone https://github.com/php-zookeeper/php-zookeeper.git \ diff --git a/images/php/8.1-cli/Dockerfile b/images/php/8.1-cli/Dockerfile index 05a43dcc..9708007e 100644 --- a/images/php/8.1-cli/Dockerfile +++ b/images/php/8.1-cli/Dockerfile @@ -1,4 +1,15 @@ # This file is automatically generated. Do not edit directly. # +FROM golang:1.15 AS builder + +RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ + && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ + && tar -xf mhsendmail.tar.gz \ + && mkdir -p ./src/github.com/mailhog/ \ + && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ + && cd ./src/github.com/mailhog/mhsendmail/ \ + && go get . \ + && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . + FROM php:8.1.1-cli ARG COMPOSER_VERSION=2.1.14 @@ -41,6 +52,10 @@ RUN apt-get update \ unzip \ vim \ openssh-client \ + gnupg2 \ + ca-certificates \ + lsb-release \ + software-properties-common \ libbz2-dev \ libjpeg62-turbo-dev \ libpng-dev \ @@ -66,15 +81,12 @@ RUN pip3 install --upgrade setuptools \ RUN npm install -g grunt-cli # Install MailHog -RUN curl -L -O https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ - && sudo chmod +x mhsendmail_linux_amd64 \ - && sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail +COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ +RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library RUN docker-php-ext-configure \ gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ -RUN docker-php-ext-configure \ - ldap --with-libdir=lib/x86_64-linux-gnu RUN docker-php-ext-configure \ opcache --enable-opcache @@ -88,7 +100,6 @@ RUN docker-php-ext-install -j$(nproc) \ gettext \ gmp \ intl \ - ldap \ mysqli \ opcache \ pdo_mysql \ @@ -116,12 +127,14 @@ RUN pecl install -o -f \ xmlrpc-1.0.0RC3 \ yaml -RUN curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ - && mkdir -p /tmp/blackfire \ - && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ - && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && echo blackfire.agent_socket=tcp://blackfire:8707 > $(php -i | grep "additional .ini" | awk '{print $9}')/blackfire.ini \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz +RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ + && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ + && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ + && apt-get update \ + && apt-get install blackfire-php \ + && rm -rf /var/lib/apt/lists/* +RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ + && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} RUN mkdir -p /tmp/zoo \ && cd /tmp/zoo \ && git clone https://github.com/php-zookeeper/php-zookeeper.git \ @@ -185,7 +198,7 @@ RUN mkdir -p ${MAGENTO_ROOT} VOLUME ${MAGENTO_ROOT} RUN chown -R www:www /usr/local /var/www /var/log /usr/local/etc/php/conf.d /etc/cron.d ${MAGENTO_ROOT} ${COMPOSER_HOME} -RUN if [[ ! -z "${CRONTAB}" ]]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi +RUN if [ ! -z "${CRONTAB}" ]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/images/php/8.1-fpm/Dockerfile b/images/php/8.1-fpm/Dockerfile index 52926182..bb188c99 100644 --- a/images/php/8.1-fpm/Dockerfile +++ b/images/php/8.1-fpm/Dockerfile @@ -1,4 +1,15 @@ # This file is automatically generated. Do not edit directly. # +FROM golang:1.15 AS builder + +RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ + && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ + && tar -xf mhsendmail.tar.gz \ + && mkdir -p ./src/github.com/mailhog/ \ + && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ + && cd ./src/github.com/mailhog/mhsendmail/ \ + && go get . \ + && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . + FROM php:8.1.1-fpm ARG MAGENTO_ROOT=/app @@ -23,6 +34,10 @@ RUN apt-get update \ sudo \ iproute2 \ git \ + gnupg2 \ + ca-certificates \ + lsb-release \ + software-properties-common \ libbz2-dev \ libjpeg62-turbo-dev \ libpng-dev \ @@ -41,15 +56,12 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install MailHog -RUN curl -L -O https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ - && sudo chmod +x mhsendmail_linux_amd64 \ - && sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail +COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ +RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library RUN docker-php-ext-configure \ gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ -RUN docker-php-ext-configure \ - ldap --with-libdir=lib/x86_64-linux-gnu RUN docker-php-ext-configure \ opcache --enable-opcache @@ -63,7 +75,6 @@ RUN docker-php-ext-install -j$(nproc) \ gettext \ gmp \ intl \ - ldap \ mysqli \ opcache \ pdo_mysql \ @@ -91,12 +102,14 @@ RUN pecl install -o -f \ xmlrpc-1.0.0RC3 \ yaml -RUN curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ - && mkdir -p /tmp/blackfire \ - && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ - && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && echo blackfire.agent_socket=tcp://blackfire:8707 > $(php -i | grep "additional .ini" | awk '{print $9}')/blackfire.ini \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz +RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ + && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ + && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ + && apt-get update \ + && apt-get install blackfire-php \ + && rm -rf /var/lib/apt/lists/* +RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ + && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} RUN mkdir -p /tmp/zoo \ && cd /tmp/zoo \ && git clone https://github.com/php-zookeeper/php-zookeeper.git \ diff --git a/images/php/cli/Dockerfile b/images/php/cli/Dockerfile index b63855ed..b793da07 100755 --- a/images/php/cli/Dockerfile +++ b/images/php/cli/Dockerfile @@ -1,4 +1,15 @@ {%note%} +FROM golang:1.15 AS builder + +RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ + && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ + && tar -xf mhsendmail.tar.gz \ + && mkdir -p ./src/github.com/mailhog/ \ + && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ + && cd ./src/github.com/mailhog/mhsendmail/ \ + && go get . \ + && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . + FROM php:{%version%}-cli ARG COMPOSER_VERSION={%composer_version%} @@ -37,9 +48,8 @@ RUN pip3 install --upgrade setuptools \ RUN npm install -g grunt-cli # Install MailHog -RUN curl -L -O https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ - && sudo chmod +x mhsendmail_linux_amd64 \ - && sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail +COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ +RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library {%docker-php-ext-configure%} @@ -84,7 +94,7 @@ RUN ["chmod", "+x", \ {%volumes_def%} RUN chown -R www:www /usr/local /var/www /var/log /usr/local/etc/php/conf.d /etc/cron.d ${MAGENTO_ROOT} ${COMPOSER_HOME} -RUN if [[ ! -z "${CRONTAB}" ]]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi +RUN if [ ! -z "${CRONTAB}" ]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/images/php/fpm/Dockerfile b/images/php/fpm/Dockerfile index d070b3f0..5da5ca40 100755 --- a/images/php/fpm/Dockerfile +++ b/images/php/fpm/Dockerfile @@ -1,4 +1,15 @@ {%note%} +FROM golang:1.15 AS builder + +RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ + && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ + && tar -xf mhsendmail.tar.gz \ + && mkdir -p ./src/github.com/mailhog/ \ + && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ + && cd ./src/github.com/mailhog/mhsendmail/ \ + && go get . \ + && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . + FROM php:{%version%}-fpm ARG MAGENTO_ROOT=/app @@ -21,9 +32,8 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install MailHog -RUN curl -L -O https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ - && sudo chmod +x mhsendmail_linux_amd64 \ - && sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail +COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ +RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library {%docker-php-ext-configure%} diff --git a/src/Command/Image/GeneratePhp.php b/src/Command/Image/GeneratePhp.php index 8d09fdd5..d6dd63c0 100644 --- a/src/Command/Image/GeneratePhp.php +++ b/src/Command/Image/GeneratePhp.php @@ -272,9 +272,7 @@ private function buildDockerfile(string $dockerfile, string $phpVersion, string $phpExtType )); } - if (isset($phpExtInstallConfig[ExtensionResolver::EXTENSION_OS_DEPENDENCIES]) - && $phpExtType !== ExtensionResolver::EXTENSION_TYPE_INSTALLATION_SCRIPT - ) { + if (isset($phpExtInstallConfig[ExtensionResolver::EXTENSION_OS_DEPENDENCIES])) { $packages = array_merge( $packages, $phpExtInstallConfig[ExtensionResolver::EXTENSION_OS_DEPENDENCIES] diff --git a/src/Compose/Php/ExtensionResolver.php b/src/Compose/Php/ExtensionResolver.php index 7efedb2a..d693549d 100644 --- a/src/Compose/Php/ExtensionResolver.php +++ b/src/Compose/Php/ExtensionResolver.php @@ -167,19 +167,37 @@ public static function getConfig(): array '>=7.0' => [self::EXTENSION_TYPE => self::EXTENSION_TYPE_CORE], ], 'blackfire' => [ - '>=7.2' => [ + '>=7.2 <8.1' => [ self::EXTENSION_TYPE => self::EXTENSION_TYPE_INSTALLATION_SCRIPT, // phpcs:disable self::EXTENSION_INSTALLATION_SCRIPT => <<< BASH -curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") -mkdir -p /tmp/blackfire -tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire -mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so -echo blackfire.agent_socket=tcp://blackfire:8707 > $(php -i | grep "additional .ini" | awk '{print $9}')/blackfire.ini -rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz +curl -L https://packages.blackfire.io/gpg.key | apt-key add +echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list +apt-get update +apt-get install blackfire-php +rm -rf /var/lib/apt/lists/* BASH // phpcs:enable - ] + ], + '>=8.1' => [ + self::EXTENSION_TYPE => self::EXTENSION_TYPE_INSTALLATION_SCRIPT, + self::EXTENSION_OS_DEPENDENCIES => [ + 'gnupg2', + 'ca-certificates', + 'lsb-release', + 'software-properties-common' + ], + // phpcs:disable + self::EXTENSION_INSTALLATION_SCRIPT => <<< BASH +curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg +install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ +echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list +apt-get update +apt-get install blackfire-php +rm -rf /var/lib/apt/lists/* +BASH +// phpcs:enable + ], ], 'bz2' => [ '>=7.0' => [ @@ -257,9 +275,12 @@ public static function getConfig(): array ], 'ldap' => [ '>=7.0' => [ - self::EXTENSION_TYPE => self::EXTENSION_TYPE_CORE, + self::EXTENSION_TYPE => self::EXTENSION_TYPE_INSTALLATION_SCRIPT, self::EXTENSION_OS_DEPENDENCIES => ['libldap2-dev'], - self::EXTENSION_CONFIGURE_OPTIONS => ['--with-libdir=lib/x86_64-linux-gnu'], + self::EXTENSION_INSTALLATION_SCRIPT => <<< BASH +if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi +docker-php-ext-configure ldap --with-libdir=lib/\${ldap_arch} +BASH ], ], 'mailparse' => [ @@ -458,13 +479,14 @@ public static function getConfig(): array self::EXTENSION_TYPE => self::EXTENSION_TYPE_INSTALLATION_SCRIPT, self::EXTENSION_INSTALLATION_SCRIPT => <<< BASH cd /tmp -curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -tar zxvf ioncube_loaders_lin_x86-64.tar.gz +if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi +curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_\${ioncube_arch}.tar.gz +tar zxvf ioncube_loaders_lin_\${ioncube_arch}.tar.gz export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") export PHP_EXT_DIR=$(php-config --extension-dir) cp "./ioncube/ioncube_loader_lin_\${PHP_VERSION}.so" "\${PHP_EXT_DIR}/ioncube.so" rm -rf ./ioncube -rm ioncube_loaders_lin_x86-64.tar.gz +rm ioncube_loaders_lin_\${ioncube_arch}.tar.gz BASH ], ], diff --git a/src/Service/ServiceFactory.php b/src/Service/ServiceFactory.php index 99f3dc5b..b04286fb 100644 --- a/src/Service/ServiceFactory.php +++ b/src/Service/ServiceFactory.php @@ -81,7 +81,7 @@ class ServiceFactory ServiceInterface::SERVICE_NGINX => self::SERVICE_NGINX_CONFIG, ServiceInterface::SERVICE_VARNISH => [ 'image' => 'magento/magento-cloud-docker-varnish', - 'version' => '6.2', + 'version' => '6.6', 'pattern' => self::PATTERN_VERSIONED, ], ServiceInterface::SERVICE_TLS => self::SERVICE_NGINX_CONFIG, @@ -163,9 +163,9 @@ class ServiceFactory 'pattern' => self::PATTERN_STD ], ServiceInterface::SERVICE_MAILHOG => [ - 'image' => 'mailhog/mailhog', - 'version' => 'latest', - 'pattern' => self::PATTERN_STD, + 'image' => 'magento/magento-cloud-docker-mailhog', + 'version' => '1.0', + 'pattern' => self::PATTERN_VERSIONED, ] ]; diff --git a/src/Test/Functional/Acceptance/Services72Cest.php b/src/Test/Functional/Acceptance/Services72Cest.php index f6c54b7c..b627e4bd 100644 --- a/src/Test/Functional/Acceptance/Services72Cest.php +++ b/src/Test/Functional/Acceptance/Services72Cest.php @@ -27,7 +27,7 @@ protected function servicesDataProvider(): array 'options' => '', 'expectedResult' => [ 'redis:5.0', - 'magento/magento-cloud-docker-varnish:6.2-1.3', + 'magento/magento-cloud-docker-varnish:6.6-1.3', 'magento/magento-cloud-docker-nginx:1.19-1.3', 'magento/magento-cloud-docker-php:7.2-fpm-1.3', 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', @@ -39,7 +39,7 @@ protected function servicesDataProvider(): array 'options' => '--redis=3.2 --db=10.1 --php=7.4 --rmq=3.5', 'expectedResult' => [ 'redis:3.2', - 'magento/magento-cloud-docker-varnish:6.2-1.3', + 'magento/magento-cloud-docker-varnish:6.6-1.3', 'magento/magento-cloud-docker-nginx:1.19-1.3', 'magento/magento-cloud-docker-php:7.4-fpm-1.3', 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', @@ -52,7 +52,7 @@ protected function servicesDataProvider(): array 'options' => '--redis=4.0 --db=10.2 --php=7.2 --rmq=3.6', 'expectedResult' => [ 'redis:4.0', - 'magento/magento-cloud-docker-varnish:6.2-1.3', + 'magento/magento-cloud-docker-varnish:6.6-1.3', 'magento/magento-cloud-docker-nginx:1.19-1.3', 'magento/magento-cloud-docker-php:7.2-fpm-1.3', 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', @@ -65,7 +65,7 @@ protected function servicesDataProvider(): array 'options' => '--with-cron --with-selenium', 'expectedResult' => [ 'redis:5.0', - 'magento/magento-cloud-docker-varnish:6.2-1.3', + 'magento/magento-cloud-docker-varnish:6.6-1.3', 'magento/magento-cloud-docker-nginx:1.19-1.3', 'magento/magento-cloud-docker-php:7.2-fpm-1.3', 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', diff --git a/src/Test/Functional/Acceptance/ServicesCest.php b/src/Test/Functional/Acceptance/ServicesCest.php index cc777745..52916362 100644 --- a/src/Test/Functional/Acceptance/ServicesCest.php +++ b/src/Test/Functional/Acceptance/ServicesCest.php @@ -91,7 +91,7 @@ protected function servicesDataProvider(): array 'options' => '', 'expectedResult' => [ 'redis:5.0', - 'magento/magento-cloud-docker-varnish:6.2-1.3', + 'magento/magento-cloud-docker-varnish:6.6-1.3', 'magento/magento-cloud-docker-nginx:1.19-1.3', 'magento/magento-cloud-docker-php:7.3-fpm-1.3', 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', @@ -103,7 +103,7 @@ protected function servicesDataProvider(): array 'options' => '--redis=3.2 --db=10.1 --php=7.2 --rmq=3.5', 'expectedResult' => [ 'redis:3.2', - 'magento/magento-cloud-docker-varnish:6.2-1.3', + 'magento/magento-cloud-docker-varnish:6.6-1.3', 'magento/magento-cloud-docker-nginx:1.19-1.3', 'magento/magento-cloud-docker-php:7.2-fpm-1.3', 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', @@ -116,7 +116,7 @@ protected function servicesDataProvider(): array 'options' => '--redis=4.0 --db=10.2 --php=7.4 --rmq=3.6', 'expectedResult' => [ 'redis:4.0', - 'magento/magento-cloud-docker-varnish:6.2-1.3', + 'magento/magento-cloud-docker-varnish:6.6-1.3', 'magento/magento-cloud-docker-nginx:1.19-1.3', 'magento/magento-cloud-docker-php:7.4-fpm-1.3', 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', @@ -129,7 +129,7 @@ protected function servicesDataProvider(): array 'options' => '--with-cron --with-selenium', 'expectedResult' => [ 'redis:5.0', - 'magento/magento-cloud-docker-varnish:6.2-1.3', + 'magento/magento-cloud-docker-varnish:6.6-1.3', 'magento/magento-cloud-docker-nginx:1.19-1.3', 'magento/magento-cloud-docker-php:7.3-fpm-1.3', 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', diff --git a/src/Test/Integration/_files/cloud_base/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base/docker-compose.exp.yml index 437f091b..e054a41c 100644 --- a/src/Test/Integration/_files/cloud_base/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base/docker-compose.exp.yml @@ -127,7 +127,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.docker - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' networks: magento: aliases: @@ -211,7 +211,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.docker - image: 'mailhog/mailhog:latest' + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1025:1025' - '8025:8025' diff --git a/src/Test/Integration/_files/cloud_base_developer/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_developer/docker-compose.exp.yml index 230bf9f3..4282169c 100644 --- a/src/Test/Integration/_files/cloud_base_developer/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_developer/docker-compose.exp.yml @@ -113,7 +113,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.docker - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' networks: magento: aliases: @@ -188,7 +188,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.docker - image: 'mailhog/mailhog:latest' + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1025:1025' - '8025:8025' diff --git a/src/Test/Integration/_files/cloud_base_developer_manual/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_developer_manual/docker-compose.exp.yml index 55b2f9d2..d8c7d928 100644 --- a/src/Test/Integration/_files/cloud_base_developer_manual/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_developer_manual/docker-compose.exp.yml @@ -93,7 +93,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.docker - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' networks: magento: aliases: @@ -164,7 +164,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.docker - image: 'mailhog/mailhog:latest' + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1025:1025' - '8025:8025' diff --git a/src/Test/Integration/_files/cloud_base_mftf/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_mftf/docker-compose.exp.yml index 27d95b9b..6e8bab5e 100644 --- a/src/Test/Integration/_files/cloud_base_mftf/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_mftf/docker-compose.exp.yml @@ -97,7 +97,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.docker - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' networks: magento: aliases: diff --git a/src/Test/Integration/_files/cloud_base_test/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_test/docker-compose.exp.yml index 99907372..0585618f 100644 --- a/src/Test/Integration/_files/cloud_base_test/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_test/docker-compose.exp.yml @@ -97,7 +97,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.docker - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' networks: magento: aliases: diff --git a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image/docker-compose.exp.yml index b3990134..53d8630b 100644 --- a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image/docker-compose.exp.yml @@ -106,7 +106,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.docker - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' networks: magento: aliases: @@ -186,7 +186,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.docker - image: 'mailhog/mailhog:latest' + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1025:1025' - '8025:8025' diff --git a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image_and_version/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image_and_version/docker-compose.exp.yml index 91185266..428d8228 100644 --- a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image_and_version/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image_and_version/docker-compose.exp.yml @@ -106,7 +106,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.docker - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' networks: magento: aliases: @@ -186,7 +186,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.docker - image: 'mailhog/mailhog:latest' + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1025:1025' - '8025:8025' diff --git a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_version/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_version/docker-compose.exp.yml index ed078cb5..a38f457a 100644 --- a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_version/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_version/docker-compose.exp.yml @@ -106,7 +106,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.docker - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' networks: magento: aliases: @@ -186,7 +186,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.docker - image: 'mailhog/mailhog:latest' + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1025:1025' - '8025:8025' diff --git a/src/Test/Integration/_files/cloud_no_tls_service/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_no_tls_service/docker-compose.exp.yml index afea27bd..e29152a7 100644 --- a/src/Test/Integration/_files/cloud_no_tls_service/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_no_tls_service/docker-compose.exp.yml @@ -107,7 +107,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.docker - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' ports: - '80:80' networks: @@ -170,7 +170,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.docker - image: 'mailhog/mailhog:latest' + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1025:1025' - '8025:8025' diff --git a/src/Test/Integration/_files/cloud_no_varnish_and_tls_service/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_no_varnish_and_tls_service/docker-compose.exp.yml index 71351546..fe34a339 100644 --- a/src/Test/Integration/_files/cloud_no_varnish_and_tls_service/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_no_varnish_and_tls_service/docker-compose.exp.yml @@ -160,7 +160,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.docker - image: 'mailhog/mailhog:latest' + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1025:1025' - '8025:8025' diff --git a/src/Test/Integration/_files/cloud_no_varnish_service/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_no_varnish_service/docker-compose.exp.yml index 1e767642..519258d7 100644 --- a/src/Test/Integration/_files/cloud_no_varnish_service/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_no_varnish_service/docker-compose.exp.yml @@ -177,7 +177,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.docker - image: 'mailhog/mailhog:latest' + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1025:1025' - '8025:8025' diff --git a/src/Test/Integration/_files/custom_cloud_base/docker-compose.exp.yml b/src/Test/Integration/_files/custom_cloud_base/docker-compose.exp.yml index a7eaef6c..2b9e82d2 100644 --- a/src/Test/Integration/_files/custom_cloud_base/docker-compose.exp.yml +++ b/src/Test/Integration/_files/custom_cloud_base/docker-compose.exp.yml @@ -70,7 +70,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.test - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' networks: magento: aliases: @@ -142,7 +142,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.test - image: 'mailhog/mailhog:latest' + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1026:1025' - '8026:8025' diff --git a/src/Test/Integration/_files/custom_cloud_base_native/docker-compose.exp.yml b/src/Test/Integration/_files/custom_cloud_base_native/docker-compose.exp.yml index a7eaef6c..2b9e82d2 100644 --- a/src/Test/Integration/_files/custom_cloud_base_native/docker-compose.exp.yml +++ b/src/Test/Integration/_files/custom_cloud_base_native/docker-compose.exp.yml @@ -70,7 +70,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.test - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' networks: magento: aliases: @@ -142,7 +142,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.test - image: 'mailhog/mailhog:latest' + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1026:1025' - '8026:8025' diff --git a/src/Test/Integration/_files/custom_cloud_custom_images/docker-compose.exp.yml b/src/Test/Integration/_files/custom_cloud_custom_images/docker-compose.exp.yml index 1cb3ed70..5bd8a9e7 100644 --- a/src/Test/Integration/_files/custom_cloud_custom_images/docker-compose.exp.yml +++ b/src/Test/Integration/_files/custom_cloud_custom_images/docker-compose.exp.yml @@ -216,7 +216,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.test - image: 'mailhog/mailhog:latest' + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1026:1025' - '8026:8025' diff --git a/src/Test/Integration/_files/custom_cloud_no_tls_service/docker-compose.exp.yml b/src/Test/Integration/_files/custom_cloud_no_tls_service/docker-compose.exp.yml index 20315574..f2b4ae19 100644 --- a/src/Test/Integration/_files/custom_cloud_no_tls_service/docker-compose.exp.yml +++ b/src/Test/Integration/_files/custom_cloud_no_tls_service/docker-compose.exp.yml @@ -61,7 +61,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.docker - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' ports: - '80:80' networks: diff --git a/src/Test/Integration/_files/custom_registry/docker-compose.exp.yml b/src/Test/Integration/_files/custom_registry/docker-compose.exp.yml index 76dade5f..74f1e281 100644 --- a/src/Test/Integration/_files/custom_registry/docker-compose.exp.yml +++ b/src/Test/Integration/_files/custom_registry/docker-compose.exp.yml @@ -109,7 +109,7 @@ services: condition: service_started varnish: hostname: varnish.magento2.docker - image: '123.example.com/magento/magento-cloud-docker-varnish:6.2-1.2.0' + image: '123.example.com/magento/magento-cloud-docker-varnish:6.6-1.2.0' networks: magento: aliases: @@ -189,7 +189,7 @@ services: condition: service_healthy mailhog: hostname: mailhog.magento2.docker - image: '123.example.com/mailhog/mailhog:latest' + image: '123.example.com/magento/magento-cloud-docker-mailhog:1.0-1.2.0' ports: - '1025:1025' - '8025:8025' From 50c77b0dc30ea33b86fe8d02224342d6c9484e93 Mon Sep 17 00:00:00 2001 From: Bohdan Korablov Date: Fri, 20 May 2022 13:09:51 -0500 Subject: [PATCH 4/6] MCLOUD-7989: No ARM images available for development on Macbook Pro M1 CPU (#95) --- images/php/7.2-cli/Dockerfile | 7 ++++++- images/php/7.2-fpm/Dockerfile | 7 ++++++- images/php/7.3-cli/Dockerfile | 7 ++++++- images/php/7.3-fpm/Dockerfile | 7 ++++++- images/php/7.4-cli/Dockerfile | 7 ++++++- images/php/7.4-fpm/Dockerfile | 7 ++++++- images/php/8.0-cli/Dockerfile | 7 ++++++- images/php/8.0-fpm/Dockerfile | 7 ++++++- src/Compose/Php/ExtensionResolver.php | 14 +------------- 9 files changed, 49 insertions(+), 21 deletions(-) diff --git a/images/php/7.2-cli/Dockerfile b/images/php/7.2-cli/Dockerfile index 168b79c3..328508ca 100644 --- a/images/php/7.2-cli/Dockerfile +++ b/images/php/7.2-cli/Dockerfile @@ -52,6 +52,10 @@ RUN apt-get update \ unzip \ vim \ openssh-client \ + gnupg2 \ + ca-certificates \ + lsb-release \ + software-properties-common \ libbz2-dev \ libjpeg62-turbo-dev \ libpng-dev \ @@ -143,7 +147,8 @@ RUN pecl install -o -f \ xdebug-3.1.2 \ yaml -RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ +RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ + && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ && apt-get update \ && apt-get install blackfire-php \ diff --git a/images/php/7.2-fpm/Dockerfile b/images/php/7.2-fpm/Dockerfile index e78aff37..3afd18e6 100644 --- a/images/php/7.2-fpm/Dockerfile +++ b/images/php/7.2-fpm/Dockerfile @@ -34,6 +34,10 @@ RUN apt-get update \ sudo \ iproute2 \ git \ + gnupg2 \ + ca-certificates \ + lsb-release \ + software-properties-common \ libbz2-dev \ libjpeg62-turbo-dev \ libpng-dev \ @@ -118,7 +122,8 @@ RUN pecl install -o -f \ xdebug-3.1.2 \ yaml -RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ +RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ + && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ && apt-get update \ && apt-get install blackfire-php \ diff --git a/images/php/7.3-cli/Dockerfile b/images/php/7.3-cli/Dockerfile index 194647fd..065b9b45 100644 --- a/images/php/7.3-cli/Dockerfile +++ b/images/php/7.3-cli/Dockerfile @@ -52,6 +52,10 @@ RUN apt-get update \ unzip \ vim \ openssh-client \ + gnupg2 \ + ca-certificates \ + lsb-release \ + software-properties-common \ libbz2-dev \ libjpeg62-turbo-dev \ libpng-dev \ @@ -140,7 +144,8 @@ RUN pecl install -o -f \ xdebug-3.1.2 \ yaml -RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ +RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ + && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ && apt-get update \ && apt-get install blackfire-php \ diff --git a/images/php/7.3-fpm/Dockerfile b/images/php/7.3-fpm/Dockerfile index 7090b32e..39e6c977 100644 --- a/images/php/7.3-fpm/Dockerfile +++ b/images/php/7.3-fpm/Dockerfile @@ -34,6 +34,10 @@ RUN apt-get update \ sudo \ iproute2 \ git \ + gnupg2 \ + ca-certificates \ + lsb-release \ + software-properties-common \ libbz2-dev \ libjpeg62-turbo-dev \ libpng-dev \ @@ -115,7 +119,8 @@ RUN pecl install -o -f \ xdebug-3.1.2 \ yaml -RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ +RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ + && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ && apt-get update \ && apt-get install blackfire-php \ diff --git a/images/php/7.4-cli/Dockerfile b/images/php/7.4-cli/Dockerfile index 2aa88ff6..108426f4 100644 --- a/images/php/7.4-cli/Dockerfile +++ b/images/php/7.4-cli/Dockerfile @@ -52,6 +52,10 @@ RUN apt-get update \ unzip \ vim \ openssh-client \ + gnupg2 \ + ca-certificates \ + lsb-release \ + software-properties-common \ libbz2-dev \ libjpeg62-turbo-dev \ libpng-dev \ @@ -130,7 +134,8 @@ RUN pecl install -o -f \ xdebug-3.1.2 \ yaml -RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ +RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ + && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ && apt-get update \ && apt-get install blackfire-php \ diff --git a/images/php/7.4-fpm/Dockerfile b/images/php/7.4-fpm/Dockerfile index c757d68d..2c085a62 100644 --- a/images/php/7.4-fpm/Dockerfile +++ b/images/php/7.4-fpm/Dockerfile @@ -34,6 +34,10 @@ RUN apt-get update \ sudo \ iproute2 \ git \ + gnupg2 \ + ca-certificates \ + lsb-release \ + software-properties-common \ libbz2-dev \ libjpeg62-turbo-dev \ libpng-dev \ @@ -105,7 +109,8 @@ RUN pecl install -o -f \ xdebug-3.1.2 \ yaml -RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ +RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ + && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ && apt-get update \ && apt-get install blackfire-php \ diff --git a/images/php/8.0-cli/Dockerfile b/images/php/8.0-cli/Dockerfile index 90cf119d..e00a862f 100644 --- a/images/php/8.0-cli/Dockerfile +++ b/images/php/8.0-cli/Dockerfile @@ -52,6 +52,10 @@ RUN apt-get update \ unzip \ vim \ openssh-client \ + gnupg2 \ + ca-certificates \ + lsb-release \ + software-properties-common \ libbz2-dev \ libjpeg62-turbo-dev \ libpng-dev \ @@ -123,7 +127,8 @@ RUN pecl install -o -f \ xmlrpc-1.0.0RC3 \ yaml -RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ +RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ + && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ && apt-get update \ && apt-get install blackfire-php \ diff --git a/images/php/8.0-fpm/Dockerfile b/images/php/8.0-fpm/Dockerfile index 06f0f505..c97994d6 100644 --- a/images/php/8.0-fpm/Dockerfile +++ b/images/php/8.0-fpm/Dockerfile @@ -34,6 +34,10 @@ RUN apt-get update \ sudo \ iproute2 \ git \ + gnupg2 \ + ca-certificates \ + lsb-release \ + software-properties-common \ libbz2-dev \ libjpeg62-turbo-dev \ libpng-dev \ @@ -98,7 +102,8 @@ RUN pecl install -o -f \ xmlrpc-1.0.0RC3 \ yaml -RUN curl -L https://packages.blackfire.io/gpg.key | apt-key add \ +RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ + && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ && apt-get update \ && apt-get install blackfire-php \ diff --git a/src/Compose/Php/ExtensionResolver.php b/src/Compose/Php/ExtensionResolver.php index d693549d..d5ddef93 100644 --- a/src/Compose/Php/ExtensionResolver.php +++ b/src/Compose/Php/ExtensionResolver.php @@ -167,19 +167,7 @@ public static function getConfig(): array '>=7.0' => [self::EXTENSION_TYPE => self::EXTENSION_TYPE_CORE], ], 'blackfire' => [ - '>=7.2 <8.1' => [ - self::EXTENSION_TYPE => self::EXTENSION_TYPE_INSTALLATION_SCRIPT, - // phpcs:disable - self::EXTENSION_INSTALLATION_SCRIPT => <<< BASH -curl -L https://packages.blackfire.io/gpg.key | apt-key add -echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list -apt-get update -apt-get install blackfire-php -rm -rf /var/lib/apt/lists/* -BASH -// phpcs:enable - ], - '>=8.1' => [ + '>=7.2' => [ self::EXTENSION_TYPE => self::EXTENSION_TYPE_INSTALLATION_SCRIPT, self::EXTENSION_OS_DEPENDENCIES => [ 'gnupg2', From 4e78329a1825d04fb42a149bc6905865fa6bdc77 Mon Sep 17 00:00:00 2001 From: Bohdan Korablov Date: Tue, 6 Sep 2022 12:58:13 -0500 Subject: [PATCH 5/6] MCLOUD-9180: Fix Jenkins tests (#96) --- tests/functional/Codeception/TestInfrastructure.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/functional/Codeception/TestInfrastructure.php b/tests/functional/Codeception/TestInfrastructure.php index 70ad4e1e..3c5af89a 100644 --- a/tests/functional/Codeception/TestInfrastructure.php +++ b/tests/functional/Codeception/TestInfrastructure.php @@ -420,6 +420,13 @@ public function addEceToolsGitRepoToComposer(): bool */ private function addGitRepoToComposer(string $name): bool { + $repoUrl = $this->_getConfig($name . '_repo'); + + // Do not add repo if url is empty + if (empty($repoUrl)) { + return true; + } + return $this->taskComposerConfig() ->set('repositories.' . $name, json_encode( [ From 71bd08618830b962e4509fe316a7b7a40055e23c Mon Sep 17 00:00:00 2001 From: Michael Casey <12436335+michaelcasey316@users.noreply.github.com> Date: Wed, 7 Sep 2022 16:53:37 -0500 Subject: [PATCH 6/6] MCLOUD-9275: Cloud Tools Release (#97) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c83d64a0..88d08e6d 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magento/magento-cloud-docker", "description": "Magento Cloud Docker", "type": "magento2-component", - "version": "1.3.2", + "version": "1.3.3", "license": [ "OSL-3.0", "AFL-3.0"