From 90495fab70b5af6fc1b0b61299ed3381b355faba Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Jan 2020 18:17:09 +0100 Subject: [PATCH 1/5] Add phpmd binary --- Dockerfiles/work/Dockerfile-5.3 | 7 +++++++ Dockerfiles/work/Dockerfile-5.4 | 7 +++++++ Dockerfiles/work/Dockerfile-5.5 | 7 +++++++ Dockerfiles/work/Dockerfile-5.6 | 7 +++++++ Dockerfiles/work/Dockerfile-7.0 | 7 +++++++ Dockerfiles/work/Dockerfile-7.1 | 7 +++++++ Dockerfiles/work/Dockerfile-7.2 | 7 +++++++ Dockerfiles/work/Dockerfile-7.3 | 7 +++++++ Dockerfiles/work/Dockerfile-7.4 | 7 +++++++ Dockerfiles/work/Dockerfile-8.0 | 7 +++++++ README.md | 4 ++++ build/ansible/group_vars/all/work.yml | 9 +++++++++ 12 files changed, 83 insertions(+) diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index 4a2908a6..d8d02469 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -263,6 +263,12 @@ RUN set -eux \ && chmod +x /usr/local/bin/php-cs-fixer \ \ \ +# -------------------- phpmd -------------------- + && wget -c https://phpmd.org/static/latest/phpmd.phar \ +&& mv phpmd.phar /usr/local/bin/phpmd \ +&& chmod +x /usr/local/bin/phpmd + \ + \ # -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -501,6 +507,7 @@ RUN set -eux \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ + && phpmd --version | grep -E '^PHPMD [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wp --allow-root --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index bff346d1..9e630e84 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -292,6 +292,12 @@ RUN set -eux \ && chmod +x /usr/local/bin/php-cs-fixer \ \ \ +# -------------------- phpmd -------------------- + && wget -c https://phpmd.org/static/latest/phpmd.phar \ +&& mv phpmd.phar /usr/local/bin/phpmd \ +&& chmod +x /usr/local/bin/phpmd + \ + \ # -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -537,6 +543,7 @@ RUN set -eux \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ + && phpmd --version | grep -E '^PHPMD [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 9405d6a5..e82b1898 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -297,6 +297,12 @@ RUN set -eux \ && chmod +x /usr/local/bin/php-cs-fixer \ \ \ +# -------------------- phpmd -------------------- + && wget -c https://phpmd.org/static/latest/phpmd.phar \ +&& mv phpmd.phar /usr/local/bin/phpmd \ +&& chmod +x /usr/local/bin/phpmd + \ + \ # -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -555,6 +561,7 @@ RUN set -eux \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ + && phpmd --version | grep -E '^PHPMD [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index a53e64b8..1afc2aeb 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -310,6 +310,12 @@ RUN set -eux \ && chmod +x /usr/local/bin/php-cs-fixer \ \ \ +# -------------------- phpmd -------------------- + && wget -c https://phpmd.org/static/latest/phpmd.phar \ +&& mv phpmd.phar /usr/local/bin/phpmd \ +&& chmod +x /usr/local/bin/phpmd + \ + \ # -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-5.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -569,6 +575,7 @@ RUN set -eux \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ + && phpmd --version | grep -E '^PHPMD [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 891b32b4..fa3da968 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -310,6 +310,12 @@ RUN set -eux \ && chmod +x /usr/local/bin/php-cs-fixer \ \ \ +# -------------------- phpmd -------------------- + && wget -c https://phpmd.org/static/latest/phpmd.phar \ +&& mv phpmd.phar /usr/local/bin/phpmd \ +&& chmod +x /usr/local/bin/phpmd + \ + \ # -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-6.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -569,6 +575,7 @@ RUN set -eux \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ + && phpmd --version | grep -E '^PHPMD [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index fd6013d9..51eacb5b 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -310,6 +310,12 @@ RUN set -eux \ && chmod +x /usr/local/bin/php-cs-fixer \ \ \ +# -------------------- phpmd -------------------- + && wget -c https://phpmd.org/static/latest/phpmd.phar \ +&& mv phpmd.phar /usr/local/bin/phpmd \ +&& chmod +x /usr/local/bin/phpmd + \ + \ # -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -569,6 +575,7 @@ RUN set -eux \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ + && phpmd --version | grep -E '^PHPMD [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 5e315ea7..32be4d5b 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -311,6 +311,12 @@ RUN set -eux \ && chmod +x /usr/local/bin/php-cs-fixer \ \ \ +# -------------------- phpmd -------------------- + && wget -c https://phpmd.org/static/latest/phpmd.phar \ +&& mv phpmd.phar /usr/local/bin/phpmd \ +&& chmod +x /usr/local/bin/phpmd + \ + \ # -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -570,6 +576,7 @@ RUN set -eux \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ + && phpmd --version | grep -E '^PHPMD [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 3a2907e1..a5da4472 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -297,6 +297,12 @@ RUN set -eux \ && chmod +x /usr/local/bin/php-cs-fixer \ \ \ +# -------------------- phpmd -------------------- + && wget -c https://phpmd.org/static/latest/phpmd.phar \ +&& mv phpmd.phar /usr/local/bin/phpmd \ +&& chmod +x /usr/local/bin/phpmd + \ + \ # -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -555,6 +561,7 @@ RUN set -eux \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ + && phpmd --version | grep -E '^PHPMD [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index bf397299..8b90af35 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -292,6 +292,12 @@ RUN set -eux \ && chmod +x /usr/local/bin/phpcbf \ \ \ +# -------------------- phpmd -------------------- + && wget -c https://phpmd.org/static/latest/phpmd.phar \ +&& mv phpmd.phar /usr/local/bin/phpmd \ +&& chmod +x /usr/local/bin/phpmd + \ + \ # -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -549,6 +555,7 @@ RUN set -eux \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ + && phpmd --version | grep -E '^PHPMD [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index 61cfdb5a..d9a6ec78 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -235,6 +235,12 @@ RUN set -eux \ && chmod +x /usr/local/bin/phpcbf \ \ \ +# -------------------- phpmd -------------------- + && wget -c https://phpmd.org/static/latest/phpmd.phar \ +&& mv phpmd.phar /usr/local/bin/phpmd \ +&& chmod +x /usr/local/bin/phpmd + \ + \ # -------------------- symfony -------------------- && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \ @@ -463,6 +469,7 @@ RUN set -eux \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ + && phpmd --version | grep -E '^PHPMD [.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wp --allow-root --version | grep -E '[.0-9]+' \ diff --git a/README.md b/README.md index d36db468..778eeed2 100644 --- a/README.md +++ b/README.md @@ -1056,6 +1056,10 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc php-cs-fixer A tool to automatically fix PHP Coding Standards issues. + + phpmd + PHP Mess Detector. + photon Photon CMS cli. diff --git a/build/ansible/group_vars/all/work.yml b/build/ansible/group_vars/all/work.yml index c211b22f..38abd524 100644 --- a/build/ansible/group_vars/all/work.yml +++ b/build/ansible/group_vars/all/work.yml @@ -102,6 +102,7 @@ software_enabled: - phpcs - phpcbf - php-cs-fixer + - phpmd - phpunit - symfony - wkhtmltopdf @@ -731,6 +732,14 @@ software_available: command: | curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && chmod +x /usr/local/bin/php-cs-fixer \ + phpmd: + disabled: [5.2] + check: phpmd --version | grep -E '^PHPMD [.0-9]+' + all: + command: | + wget -c https://phpmd.org/static/latest/phpmd.phar \ + && mv phpmd.phar /usr/local/bin/phpmd \ + && chmod +x /usr/local/bin/phpmd phpunit: disabled: [5.2, 8.0] check: phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' From f04a5ec693954a8b9e8ceb68b8c1c6ff9029d946 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Jan 2020 18:32:01 +0100 Subject: [PATCH 2/5] Fix phpredis module for PHP 7.4 and 8.0 --- Dockerfiles/mods/Dockerfile-7.4 | 5 ++--- Dockerfiles/mods/Dockerfile-8.0 | 12 ++---------- build/ansible/group_vars/all/mods.yml | 17 ++--------------- 3 files changed, 6 insertions(+), 28 deletions(-) diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index 38b5090f..4bfe4f9b 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -477,11 +477,10 @@ RUN set -eux \ # Type: GIT extension && git clone https://github.com/phpredis/phpredis /tmp/redis \ && cd /tmp/redis \ + # Custom: Branch + && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \ # Custom: Install command && phpize \ -&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \ -&& sed -i'' 's/ZEND_ACC_DTOR | //g' redis.c \ -&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis_cluster.c \ && ./configure --enable-redis \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ diff --git a/Dockerfiles/mods/Dockerfile-8.0 b/Dockerfiles/mods/Dockerfile-8.0 index bd97b18b..eedfc792 100644 --- a/Dockerfiles/mods/Dockerfile-8.0 +++ b/Dockerfiles/mods/Dockerfile-8.0 @@ -361,18 +361,10 @@ RUN set -eux \ # Type: GIT extension && git clone https://github.com/phpredis/phpredis /tmp/redis \ && cd /tmp/redis \ + # Custom: Branch + && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \ # Custom: Install command && phpize \ -&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \ -&& sed -i'' 's/ZEND_ACC_DTOR | //g' redis.c \ -&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis_cluster.c \ -# FIXME: This is a work-around to mitigate compile error with PHP 8.0 -&& rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C)/)/g' \ -&& rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C,/,/g' \ -&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC)/)/g' \ -&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC,/,/g' \ -&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC)/)/g' \ -&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC,/,/g' \ && ./configure --enable-redis \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ diff --git a/build/ansible/group_vars/all/mods.yml b/build/ansible/group_vars/all/mods.yml index 5ac7ec9d..21249461 100644 --- a/build/ansible/group_vars/all/mods.yml +++ b/build/ansible/group_vars/all/mods.yml @@ -814,31 +814,18 @@ extensions_available: 7.4: type: git git_url: https://github.com/phpredis/phpredis - # This is a nasty work-around to fix current phpredis implementation for PHP 7.4 + git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) command: | phpize \ - && sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \ - && sed -i'' 's/ZEND_ACC_DTOR | //g' redis.c \ - && sed -i'' 's/ZEND_ACC_CTOR | //g' redis_cluster.c \ && ./configure --enable-redis \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ 8.0: type: git git_url: https://github.com/phpredis/phpredis - # This is a nasty work-around to fix current phpredis implementation for PHP 7.4 + git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) command: | phpize \ - && sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \ - && sed -i'' 's/ZEND_ACC_DTOR | //g' redis.c \ - && sed -i'' 's/ZEND_ACC_CTOR | //g' redis_cluster.c \ - # FIXME: This is a work-around to mitigate compile error with PHP 8.0 - && rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C)/)/g' \ - && rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C,/,/g' \ - && rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC)/)/g' \ - && rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC,/,/g' \ - && rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC)/)/g' \ - && rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC,/,/g' \ && ./configure --enable-redis \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ From cc7746131198988b469fc12b81f0d645d2b3a0cf Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Jan 2020 18:35:29 +0100 Subject: [PATCH 3/5] Fix missing backslash in Docker command --- Dockerfiles/work/Dockerfile-5.3 | 2 +- Dockerfiles/work/Dockerfile-5.4 | 2 +- Dockerfiles/work/Dockerfile-5.5 | 2 +- Dockerfiles/work/Dockerfile-5.6 | 2 +- Dockerfiles/work/Dockerfile-7.0 | 2 +- Dockerfiles/work/Dockerfile-7.1 | 2 +- Dockerfiles/work/Dockerfile-7.2 | 2 +- Dockerfiles/work/Dockerfile-7.3 | 2 +- Dockerfiles/work/Dockerfile-7.4 | 2 +- Dockerfiles/work/Dockerfile-8.0 | 2 +- build/ansible/group_vars/all/work.yml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index d8d02469..1093d26f 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -266,7 +266,7 @@ RUN set -eux \ # -------------------- phpmd -------------------- && wget -c https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ -&& chmod +x /usr/local/bin/phpmd +&& chmod +x /usr/local/bin/phpmd \ \ \ # -------------------- phpunit -------------------- diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 9e630e84..96e868e4 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -295,7 +295,7 @@ RUN set -eux \ # -------------------- phpmd -------------------- && wget -c https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ -&& chmod +x /usr/local/bin/phpmd +&& chmod +x /usr/local/bin/phpmd \ \ \ # -------------------- phpunit -------------------- diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index e82b1898..5c36aca8 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -300,7 +300,7 @@ RUN set -eux \ # -------------------- phpmd -------------------- && wget -c https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ -&& chmod +x /usr/local/bin/phpmd +&& chmod +x /usr/local/bin/phpmd \ \ \ # -------------------- phpunit -------------------- diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 1afc2aeb..517e3a0a 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -313,7 +313,7 @@ RUN set -eux \ # -------------------- phpmd -------------------- && wget -c https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ -&& chmod +x /usr/local/bin/phpmd +&& chmod +x /usr/local/bin/phpmd \ \ \ # -------------------- phpunit -------------------- diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index fa3da968..543ae26a 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -313,7 +313,7 @@ RUN set -eux \ # -------------------- phpmd -------------------- && wget -c https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ -&& chmod +x /usr/local/bin/phpmd +&& chmod +x /usr/local/bin/phpmd \ \ \ # -------------------- phpunit -------------------- diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 51eacb5b..4d82ea8f 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -313,7 +313,7 @@ RUN set -eux \ # -------------------- phpmd -------------------- && wget -c https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ -&& chmod +x /usr/local/bin/phpmd +&& chmod +x /usr/local/bin/phpmd \ \ \ # -------------------- phpunit -------------------- diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 32be4d5b..3b9732f3 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -314,7 +314,7 @@ RUN set -eux \ # -------------------- phpmd -------------------- && wget -c https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ -&& chmod +x /usr/local/bin/phpmd +&& chmod +x /usr/local/bin/phpmd \ \ \ # -------------------- phpunit -------------------- diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index a5da4472..c1dbe1b9 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -300,7 +300,7 @@ RUN set -eux \ # -------------------- phpmd -------------------- && wget -c https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ -&& chmod +x /usr/local/bin/phpmd +&& chmod +x /usr/local/bin/phpmd \ \ \ # -------------------- phpunit -------------------- diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index 8b90af35..0c8499b4 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -295,7 +295,7 @@ RUN set -eux \ # -------------------- phpmd -------------------- && wget -c https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ -&& chmod +x /usr/local/bin/phpmd +&& chmod +x /usr/local/bin/phpmd \ \ \ # -------------------- phpunit -------------------- diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index d9a6ec78..b8353fa3 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -238,7 +238,7 @@ RUN set -eux \ # -------------------- phpmd -------------------- && wget -c https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ -&& chmod +x /usr/local/bin/phpmd +&& chmod +x /usr/local/bin/phpmd \ \ \ # -------------------- symfony -------------------- diff --git a/build/ansible/group_vars/all/work.yml b/build/ansible/group_vars/all/work.yml index 38abd524..de6d877a 100644 --- a/build/ansible/group_vars/all/work.yml +++ b/build/ansible/group_vars/all/work.yml @@ -739,7 +739,7 @@ software_available: command: | wget -c https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ - && chmod +x /usr/local/bin/phpmd + && chmod +x /usr/local/bin/phpmd \ phpunit: disabled: [5.2, 8.0] check: phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' From 529a33f1a06b1aacf8c94a6b1a0277d12f5f890e Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Jan 2020 19:18:35 +0100 Subject: [PATCH 4/5] Fix phpredis for PHP 8.0 --- Dockerfiles/mods/Dockerfile-7.4 | 16 ++++------------ Dockerfiles/mods/Dockerfile-8.0 | 3 ++- Makefile | 1 + build/ansible/group_vars/all/mods.yml | 13 +++---------- 4 files changed, 10 insertions(+), 23 deletions(-) diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index 4bfe4f9b..57520fd9 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -473,18 +473,10 @@ RUN set -eux \ # -------------------- Installing PHP Extension: redis -------------------- RUN set -eux \ - # Installation: Version specific - # Type: GIT extension - && git clone https://github.com/phpredis/phpredis /tmp/redis \ - && cd /tmp/redis \ - # Custom: Branch - && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \ - # Custom: Install command - && phpize \ -&& ./configure --enable-redis \ -&& make -j$(getconf _NPROCESSORS_ONLN) \ -&& make install \ - \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install redis \ # Enabling && docker-php-ext-enable redis \ && true diff --git a/Dockerfiles/mods/Dockerfile-8.0 b/Dockerfiles/mods/Dockerfile-8.0 index eedfc792..643e803a 100644 --- a/Dockerfiles/mods/Dockerfile-8.0 +++ b/Dockerfiles/mods/Dockerfile-8.0 @@ -364,7 +364,8 @@ RUN set -eux \ # Custom: Branch && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \ # Custom: Install command - && phpize \ + && sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \ +&& phpize \ && ./configure --enable-redis \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ diff --git a/Makefile b/Makefile index a8139b14..a49e1def 100644 --- a/Makefile +++ b/Makefile @@ -178,6 +178,7 @@ build-work: # REBUILD TARGETS # ------------------------------------------------------------------------------------------------- +rebuild-base: _pull-root-image rebuild-base: NO_CACHE=--no-cache rebuild-base: build-base diff --git a/build/ansible/group_vars/all/mods.yml b/build/ansible/group_vars/all/mods.yml index 21249461..25a7c823 100644 --- a/build/ansible/group_vars/all/mods.yml +++ b/build/ansible/group_vars/all/mods.yml @@ -811,21 +811,14 @@ extensions_available: 5.6: type: pecl version: 4.3.0 - 7.4: - type: git - git_url: https://github.com/phpredis/phpredis - git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) - command: | - phpize \ - && ./configure --enable-redis \ - && make -j$(getconf _NPROCESSORS_ONLN) \ - && make install \ 8.0: type: git git_url: https://github.com/phpredis/phpredis git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) + # TODO: This is a nasty work-around to fix current phpredis implementation for PHP 8.0 command: | - phpize \ + sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \ + && phpize \ && ./configure --enable-redis \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ From fc5e5e21e50339102daea09568f325ae53abd300 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Jan 2020 20:52:31 +0100 Subject: [PATCH 5/5] Ensure unwanted artifacts are removed during build --- Dockerfiles/work/Dockerfile-5.2 | 4 +++- Dockerfiles/work/Dockerfile-5.3 | 6 ++++-- Dockerfiles/work/Dockerfile-5.4 | 6 ++++-- Dockerfiles/work/Dockerfile-5.5 | 6 ++++-- Dockerfiles/work/Dockerfile-5.6 | 6 ++++-- Dockerfiles/work/Dockerfile-7.0 | 6 ++++-- Dockerfiles/work/Dockerfile-7.1 | 6 ++++-- Dockerfiles/work/Dockerfile-7.2 | 6 ++++-- Dockerfiles/work/Dockerfile-7.3 | 6 ++++-- Dockerfiles/work/Dockerfile-7.4 | 6 ++++-- Dockerfiles/work/Dockerfile-8.0 | 6 ++++-- build/ansible/DOCKERFILES/Dockerfile-work.j2 | 2 ++ build/ansible/group_vars/all/work.yml | 4 ++-- 13 files changed, 47 insertions(+), 23 deletions(-) diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index 72822316..f73c282f 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -191,7 +191,7 @@ RUN set -eux \ \ \ # -------------------- mhsendmail -------------------- - && wget https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ + && wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ \ @@ -339,6 +339,7 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ && rm -rf /home/devilbox/.config \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -472,6 +473,7 @@ RUN set -eux \ && sass --version | grep -E '[.0-9]+' \ \ # -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ && rm -rf /home/devilbox/.config/ \ && rm -rf /root/.ansible \ && rm -rf /root/.console \ diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index 1093d26f..0187c4b8 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -208,7 +208,7 @@ RUN set -eux \ \ \ # -------------------- mhsendmail -------------------- - && wget https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ + && wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ \ @@ -264,7 +264,7 @@ RUN set -eux \ \ \ # -------------------- phpmd -------------------- - && wget -c https://phpmd.org/static/latest/phpmd.phar \ + && wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ && chmod +x /usr/local/bin/phpmd \ \ @@ -395,6 +395,7 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ && rm -rf /home/devilbox/.config \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -536,6 +537,7 @@ RUN set -eux \ && sass --version | grep -E '[.0-9]+' \ \ # -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ && rm -rf /home/devilbox/.config/ \ && rm -rf /root/.ansible \ && rm -rf /root/.console \ diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 96e868e4..a99a50e3 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -237,7 +237,7 @@ RUN set -eux \ \ \ # -------------------- mhsendmail -------------------- - && wget https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ + && wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ \ @@ -293,7 +293,7 @@ RUN set -eux \ \ \ # -------------------- phpmd -------------------- - && wget -c https://phpmd.org/static/latest/phpmd.phar \ + && wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ && chmod +x /usr/local/bin/phpmd \ \ @@ -428,6 +428,7 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ && rm -rf /home/devilbox/.config \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -573,6 +574,7 @@ RUN set -eux \ && sass --version | grep -E '[.0-9]+' \ \ # -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ && rm -rf /home/devilbox/.config/ \ && rm -rf /root/.ansible \ && rm -rf /root/.console \ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 5c36aca8..65329b2b 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -241,7 +241,7 @@ RUN set -eux \ \ \ # -------------------- mhsendmail -------------------- - && wget https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ + && wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ \ @@ -298,7 +298,7 @@ RUN set -eux \ \ \ # -------------------- phpmd -------------------- - && wget -c https://phpmd.org/static/latest/phpmd.phar \ + && wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ && chmod +x /usr/local/bin/phpmd \ \ @@ -445,6 +445,7 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ && rm -rf /home/devilbox/.config \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -594,6 +595,7 @@ RUN set -eux \ && sass --version | grep -E '[.0-9]+' \ \ # -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ && rm -rf /home/devilbox/.config/ \ && rm -rf /root/.ansible \ && rm -rf /root/.console \ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 517e3a0a..f2d9912d 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -254,7 +254,7 @@ RUN set -eux \ \ \ # -------------------- mhsendmail -------------------- - && wget https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ + && wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ \ @@ -311,7 +311,7 @@ RUN set -eux \ \ \ # -------------------- phpmd -------------------- - && wget -c https://phpmd.org/static/latest/phpmd.phar \ + && wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ && chmod +x /usr/local/bin/phpmd \ \ @@ -458,6 +458,7 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ && rm -rf /home/devilbox/.config \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -608,6 +609,7 @@ RUN set -eux \ && sass --version | grep -E '[.0-9]+' \ \ # -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ && rm -rf /home/devilbox/.config/ \ && rm -rf /root/.ansible \ && rm -rf /root/.console \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 543ae26a..2f907d0f 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -254,7 +254,7 @@ RUN set -eux \ \ \ # -------------------- mhsendmail -------------------- - && wget https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ + && wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ \ @@ -311,7 +311,7 @@ RUN set -eux \ \ \ # -------------------- phpmd -------------------- - && wget -c https://phpmd.org/static/latest/phpmd.phar \ + && wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ && chmod +x /usr/local/bin/phpmd \ \ @@ -458,6 +458,7 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ && rm -rf /home/devilbox/.config \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -608,6 +609,7 @@ RUN set -eux \ && sass --version | grep -E '[.0-9]+' \ \ # -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ && rm -rf /home/devilbox/.config/ \ && rm -rf /root/.ansible \ && rm -rf /root/.console \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 4d82ea8f..bc6a252d 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -254,7 +254,7 @@ RUN set -eux \ \ \ # -------------------- mhsendmail -------------------- - && wget https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ + && wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ \ @@ -311,7 +311,7 @@ RUN set -eux \ \ \ # -------------------- phpmd -------------------- - && wget -c https://phpmd.org/static/latest/phpmd.phar \ + && wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ && chmod +x /usr/local/bin/phpmd \ \ @@ -458,6 +458,7 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ && rm -rf /home/devilbox/.config \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -608,6 +609,7 @@ RUN set -eux \ && sass --version | grep -E '[.0-9]+' \ \ # -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ && rm -rf /home/devilbox/.config/ \ && rm -rf /root/.ansible \ && rm -rf /root/.console \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 3b9732f3..dec6576b 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -254,7 +254,7 @@ RUN set -eux \ \ \ # -------------------- mhsendmail -------------------- - && wget https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ + && wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ \ @@ -312,7 +312,7 @@ RUN set -eux \ \ \ # -------------------- phpmd -------------------- - && wget -c https://phpmd.org/static/latest/phpmd.phar \ + && wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ && chmod +x /usr/local/bin/phpmd \ \ @@ -459,6 +459,7 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ && rm -rf /home/devilbox/.config \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -609,6 +610,7 @@ RUN set -eux \ && sass --version | grep -E '[.0-9]+' \ \ # -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ && rm -rf /home/devilbox/.config/ \ && rm -rf /root/.ansible \ && rm -rf /root/.console \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index c1dbe1b9..80c2e97c 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -254,7 +254,7 @@ RUN set -eux \ \ \ # -------------------- mhsendmail -------------------- - && wget https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ + && wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ \ @@ -298,7 +298,7 @@ RUN set -eux \ \ \ # -------------------- phpmd -------------------- - && wget -c https://phpmd.org/static/latest/phpmd.phar \ + && wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ && chmod +x /usr/local/bin/phpmd \ \ @@ -445,6 +445,7 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ && rm -rf /home/devilbox/.config \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -594,6 +595,7 @@ RUN set -eux \ && sass --version | grep -E '[.0-9]+' \ \ # -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ && rm -rf /home/devilbox/.config/ \ && rm -rf /root/.ansible \ && rm -rf /root/.console \ diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index 0c8499b4..841100db 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -254,7 +254,7 @@ RUN set -eux \ \ \ # -------------------- mhsendmail -------------------- - && wget https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ + && wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ \ @@ -293,7 +293,7 @@ RUN set -eux \ \ \ # -------------------- phpmd -------------------- - && wget -c https://phpmd.org/static/latest/phpmd.phar \ + && wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ && chmod +x /usr/local/bin/phpmd \ \ @@ -440,6 +440,7 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ && rm -rf /home/devilbox/.config \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -588,6 +589,7 @@ RUN set -eux \ && sass --version | grep -E '[.0-9]+' \ \ # -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ && rm -rf /home/devilbox/.config/ \ && rm -rf /root/.ansible \ && rm -rf /root/.console \ diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index b8353fa3..fb877958 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -197,7 +197,7 @@ RUN set -eux \ \ \ # -------------------- mhsendmail -------------------- - && wget https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ + && wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ \ @@ -236,7 +236,7 @@ RUN set -eux \ \ \ # -------------------- phpmd -------------------- - && wget -c https://phpmd.org/static/latest/phpmd.phar \ + && wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ && chmod +x /usr/local/bin/phpmd \ \ @@ -359,6 +359,7 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ && rm -rf /home/devilbox/.config \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -497,6 +498,7 @@ RUN set -eux \ && sass --version | grep -E '[.0-9]+' \ \ # -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ && rm -rf /home/devilbox/.config/ \ && rm -rf /root/.ansible \ && rm -rf /root/.console \ diff --git a/build/ansible/DOCKERFILES/Dockerfile-work.j2 b/build/ansible/DOCKERFILES/Dockerfile-work.j2 index 396fbe29..5dd1d085 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-work.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-work.j2 @@ -308,6 +308,7 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ && rm -rf /home/devilbox/.config \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -502,6 +503,7 @@ RUN set -eux \ {%- endif -%} {% endfor %}{{ "\n\t" }}\ # -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ && rm -rf /home/devilbox/.config/ \ && rm -rf /root/.ansible \ && rm -rf /root/.console \ diff --git a/build/ansible/group_vars/all/work.yml b/build/ansible/group_vars/all/work.yml index de6d877a..d57f6860 100644 --- a/build/ansible/group_vars/all/work.yml +++ b/build/ansible/group_vars/all/work.yml @@ -572,7 +572,7 @@ software_available: mhsendmail: all: command: | - wget https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ + wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ mysqldumpsecure: @@ -737,7 +737,7 @@ software_available: check: phpmd --version | grep -E '^PHPMD [.0-9]+' all: command: | - wget -c https://phpmd.org/static/latest/phpmd.phar \ + wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \ && mv phpmd.phar /usr/local/bin/phpmd \ && chmod +x /usr/local/bin/phpmd \ phpunit: