From 5838afdb172430bcaec124fa1fe5de4031dc7437 Mon Sep 17 00:00:00 2001 From: MagicLegend Date: Fri, 22 Apr 2022 18:32:35 +0300 Subject: [PATCH] Added n98-magerun2 command to CLI containers --- images/php/7.2-cli/Dockerfile | 6 +++++- images/php/7.2-cli/bin/magerun2 | 5 +++++ images/php/7.3-cli/Dockerfile | 6 +++++- images/php/7.3-cli/bin/magerun2 | 5 +++++ images/php/7.4-cli/Dockerfile | 6 +++++- images/php/7.4-cli/bin/magerun2 | 5 +++++ images/php/8.0-cli/Dockerfile | 6 +++++- images/php/8.0-cli/bin/magerun2 | 5 +++++ images/php/8.1-cli/Dockerfile | 6 +++++- images/php/8.1-cli/bin/magerun2 | 5 +++++ images/php/cli/Dockerfile | 6 +++++- images/php/cli/bin/magerun2 | 5 +++++ 12 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 images/php/7.2-cli/bin/magerun2 create mode 100644 images/php/7.3-cli/bin/magerun2 create mode 100644 images/php/7.4-cli/bin/magerun2 create mode 100644 images/php/8.0-cli/bin/magerun2 create mode 100644 images/php/8.1-cli/bin/magerun2 create mode 100644 images/php/cli/bin/magerun2 diff --git a/images/php/7.2-cli/Dockerfile b/images/php/7.2-cli/Dockerfile index b36cb7dc..a0189f75 100644 --- a/images/php/7.2-cli/Dockerfile +++ b/images/php/7.2-cli/Dockerfile @@ -189,6 +189,9 @@ ADD etc/php-gnupg.ini /usr/local/etc/php/conf.d/gnupg.ini # Get composer installed to /usr/local/bin/composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --version=${COMPOSER_VERSION} --filename=composer +# Install n98-magerun2.phar and move to /usr/local/bin/ +RUN curl -O https://files.magerun.net/n98-magerun2.phar && chmod +x ./n98-magerun2.phar && mv ./n98-magerun2.phar /usr/local/bin/ + ADD bin/* /usr/local/bin/ RUN groupadd -g 1000 www && useradd -g 1000 -u 1000 -d ${MAGENTO_ROOT} -s /bin/bash www @@ -205,7 +208,8 @@ RUN ["chmod", "+x", \ "/usr/local/bin/cloud-deploy", \ "/usr/local/bin/cloud-post-deploy", \ "/usr/local/bin/run-cron", \ - "/usr/local/bin/run-hooks" \ + "/usr/local/bin/run-hooks", \ + "/usr/local/bin/magerun2" \ ] RUN mkdir -p ${MAGENTO_ROOT} diff --git a/images/php/7.2-cli/bin/magerun2 b/images/php/7.2-cli/bin/magerun2 new file mode 100644 index 00000000..602133bc --- /dev/null +++ b/images/php/7.2-cli/bin/magerun2 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +[ "$DEBUG" = "true" ] && set -x + +su www-data -s /bin/bash -c "n98-magerun2.phar --root-dir=$MAGENTO_ROOT $*" \ No newline at end of file diff --git a/images/php/7.3-cli/Dockerfile b/images/php/7.3-cli/Dockerfile index 47d7e589..e838891c 100644 --- a/images/php/7.3-cli/Dockerfile +++ b/images/php/7.3-cli/Dockerfile @@ -186,6 +186,9 @@ ADD etc/php-gnupg.ini /usr/local/etc/php/conf.d/gnupg.ini # Get composer installed to /usr/local/bin/composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --version=${COMPOSER_VERSION} --filename=composer +# Install n98-magerun2.phar and move to /usr/local/bin/ +RUN curl -O https://files.magerun.net/n98-magerun2.phar && chmod +x ./n98-magerun2.phar && mv ./n98-magerun2.phar /usr/local/bin/ + ADD bin/* /usr/local/bin/ RUN groupadd -g 1000 www && useradd -g 1000 -u 1000 -d ${MAGENTO_ROOT} -s /bin/bash www @@ -202,7 +205,8 @@ RUN ["chmod", "+x", \ "/usr/local/bin/cloud-deploy", \ "/usr/local/bin/cloud-post-deploy", \ "/usr/local/bin/run-cron", \ - "/usr/local/bin/run-hooks" \ + "/usr/local/bin/run-hooks", \ + "/usr/local/bin/magerun2" \ ] RUN mkdir -p ${MAGENTO_ROOT} diff --git a/images/php/7.3-cli/bin/magerun2 b/images/php/7.3-cli/bin/magerun2 new file mode 100644 index 00000000..602133bc --- /dev/null +++ b/images/php/7.3-cli/bin/magerun2 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +[ "$DEBUG" = "true" ] && set -x + +su www-data -s /bin/bash -c "n98-magerun2.phar --root-dir=$MAGENTO_ROOT $*" \ No newline at end of file diff --git a/images/php/7.4-cli/Dockerfile b/images/php/7.4-cli/Dockerfile index f70a3f74..f149c5dc 100644 --- a/images/php/7.4-cli/Dockerfile +++ b/images/php/7.4-cli/Dockerfile @@ -176,6 +176,9 @@ ADD etc/php-gnupg.ini /usr/local/etc/php/conf.d/gnupg.ini # Get composer installed to /usr/local/bin/composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --version=${COMPOSER_VERSION} --filename=composer +# Install n98-magerun2.phar and move to /usr/local/bin/ +RUN curl -O https://files.magerun.net/n98-magerun2.phar && chmod +x ./n98-magerun2.phar && mv ./n98-magerun2.phar /usr/local/bin/ + ADD bin/* /usr/local/bin/ RUN groupadd -g 1000 www && useradd -g 1000 -u 1000 -d ${MAGENTO_ROOT} -s /bin/bash www @@ -192,7 +195,8 @@ RUN ["chmod", "+x", \ "/usr/local/bin/cloud-deploy", \ "/usr/local/bin/cloud-post-deploy", \ "/usr/local/bin/run-cron", \ - "/usr/local/bin/run-hooks" \ + "/usr/local/bin/run-hooks", \ + "/usr/local/bin/magerun2" \ ] RUN mkdir -p ${MAGENTO_ROOT} diff --git a/images/php/7.4-cli/bin/magerun2 b/images/php/7.4-cli/bin/magerun2 new file mode 100644 index 00000000..602133bc --- /dev/null +++ b/images/php/7.4-cli/bin/magerun2 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +[ "$DEBUG" = "true" ] && set -x + +su www-data -s /bin/bash -c "n98-magerun2.phar --root-dir=$MAGENTO_ROOT $*" \ No newline at end of file diff --git a/images/php/8.0-cli/Dockerfile b/images/php/8.0-cli/Dockerfile index 54c0367b..6f0afe16 100644 --- a/images/php/8.0-cli/Dockerfile +++ b/images/php/8.0-cli/Dockerfile @@ -161,6 +161,9 @@ ADD etc/php-gnupg.ini /usr/local/etc/php/conf.d/gnupg.ini # Get composer installed to /usr/local/bin/composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --version=${COMPOSER_VERSION} --filename=composer +# Install n98-magerun2.phar and move to /usr/local/bin/ +RUN curl -O https://files.magerun.net/n98-magerun2.phar && chmod +x ./n98-magerun2.phar && mv ./n98-magerun2.phar /usr/local/bin/ + ADD bin/* /usr/local/bin/ RUN groupadd -g 1000 www && useradd -g 1000 -u 1000 -d ${MAGENTO_ROOT} -s /bin/bash www @@ -177,7 +180,8 @@ RUN ["chmod", "+x", \ "/usr/local/bin/cloud-deploy", \ "/usr/local/bin/cloud-post-deploy", \ "/usr/local/bin/run-cron", \ - "/usr/local/bin/run-hooks" \ + "/usr/local/bin/run-hooks", \ + "/usr/local/bin/magerun2" \ ] RUN mkdir -p ${MAGENTO_ROOT} diff --git a/images/php/8.0-cli/bin/magerun2 b/images/php/8.0-cli/bin/magerun2 new file mode 100644 index 00000000..602133bc --- /dev/null +++ b/images/php/8.0-cli/bin/magerun2 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +[ "$DEBUG" = "true" ] && set -x + +su www-data -s /bin/bash -c "n98-magerun2.phar --root-dir=$MAGENTO_ROOT $*" \ No newline at end of file diff --git a/images/php/8.1-cli/Dockerfile b/images/php/8.1-cli/Dockerfile index 05a43dcc..2608e0bb 100644 --- a/images/php/8.1-cli/Dockerfile +++ b/images/php/8.1-cli/Dockerfile @@ -161,6 +161,9 @@ ADD etc/php-gnupg.ini /usr/local/etc/php/conf.d/gnupg.ini # Get composer installed to /usr/local/bin/composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --version=${COMPOSER_VERSION} --filename=composer +# Install n98-magerun2.phar and move to /usr/local/bin/ +RUN curl -O https://files.magerun.net/n98-magerun2.phar && chmod +x ./n98-magerun2.phar && mv ./n98-magerun2.phar /usr/local/bin/ + ADD bin/* /usr/local/bin/ RUN groupadd -g 1000 www && useradd -g 1000 -u 1000 -d ${MAGENTO_ROOT} -s /bin/bash www @@ -177,7 +180,8 @@ RUN ["chmod", "+x", \ "/usr/local/bin/cloud-deploy", \ "/usr/local/bin/cloud-post-deploy", \ "/usr/local/bin/run-cron", \ - "/usr/local/bin/run-hooks" \ + "/usr/local/bin/run-hooks", \ + "/usr/local/bin/magerun2" \ ] RUN mkdir -p ${MAGENTO_ROOT} diff --git a/images/php/8.1-cli/bin/magerun2 b/images/php/8.1-cli/bin/magerun2 new file mode 100644 index 00000000..602133bc --- /dev/null +++ b/images/php/8.1-cli/bin/magerun2 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +[ "$DEBUG" = "true" ] && set -x + +su www-data -s /bin/bash -c "n98-magerun2.phar --root-dir=$MAGENTO_ROOT $*" \ No newline at end of file diff --git a/images/php/cli/Dockerfile b/images/php/cli/Dockerfile index b63855ed..fd9bde7f 100755 --- a/images/php/cli/Dockerfile +++ b/images/php/cli/Dockerfile @@ -60,6 +60,9 @@ ADD etc/php-gnupg.ini /usr/local/etc/php/conf.d/gnupg.ini # Get composer installed to /usr/local/bin/composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --version=${COMPOSER_VERSION} --filename=composer +# Install n98-magerun2.phar and move to /usr/local/bin/ +RUN curl -O https://files.magerun.net/n98-magerun2.phar && chmod +x ./n98-magerun2.phar && mv ./n98-magerun2.phar /usr/local/bin/ + ADD bin/* /usr/local/bin/ RUN groupadd -g 1000 www && useradd -g 1000 -u 1000 -d ${MAGENTO_ROOT} -s /bin/bash www @@ -76,7 +79,8 @@ RUN ["chmod", "+x", \ "/usr/local/bin/cloud-deploy", \ "/usr/local/bin/cloud-post-deploy", \ "/usr/local/bin/run-cron", \ - "/usr/local/bin/run-hooks" \ + "/usr/local/bin/run-hooks", \ + "/usr/local/bin/magerun2" \ ] {%volumes_cmd%} diff --git a/images/php/cli/bin/magerun2 b/images/php/cli/bin/magerun2 new file mode 100644 index 00000000..602133bc --- /dev/null +++ b/images/php/cli/bin/magerun2 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +[ "$DEBUG" = "true" ] && set -x + +su www-data -s /bin/bash -c "n98-magerun2.phar --root-dir=$MAGENTO_ROOT $*" \ No newline at end of file