Compare commits

...

6 Commits
0.98 ... 0.99

Author SHA1 Message Date
cytopia
172baf9743 Merge pull request #145 from devilbox/release-0.99
Add phpmd binary
2020-01-04 20:51:41 +01:00
cytopia
fc5e5e21e5 Ensure unwanted artifacts are removed during build 2020-01-04 20:52:31 +01:00
cytopia
529a33f1a0 Fix phpredis for PHP 8.0 2020-01-04 19:18:35 +01:00
cytopia
cc77461311 Fix missing backslash in Docker command 2020-01-04 18:35:29 +01:00
cytopia
f04a5ec693 Fix phpredis module for PHP 7.4 and 8.0 2020-01-04 18:32:01 +01:00
cytopia
90495fab70 Add phpmd binary 2020-01-04 18:17:09 +01:00
18 changed files with 132 additions and 60 deletions

View File

@@ -473,19 +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: 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 \
\
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install redis \
# Enabling
&& docker-php-ext-enable redis \
&& true

View File

@@ -361,18 +361,11 @@ 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' \
&& sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \
&& phpize \
&& ./configure --enable-redis \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \

View File

@@ -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 \

View File

@@ -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 \
\
@@ -263,6 +263,12 @@ RUN set -eux \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
\
# -------------------- phpmd --------------------
&& wget --no-hsts 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 \
@@ -389,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) \
@@ -501,6 +508,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]+' \
@@ -529,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 \

View File

@@ -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 \
\
@@ -292,6 +292,12 @@ RUN set -eux \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
\
# -------------------- phpmd --------------------
&& wget --no-hsts 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 \
@@ -422,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) \
@@ -537,6 +544,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.+\)" \
@@ -566,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 \

View File

@@ -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 \
\
@@ -297,6 +297,12 @@ RUN set -eux \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
\
# -------------------- phpmd --------------------
&& wget --no-hsts 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 \
@@ -439,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) \
@@ -555,6 +562,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.+\)" \
@@ -587,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 \

View File

@@ -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 \
\
@@ -310,6 +310,12 @@ RUN set -eux \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
\
# -------------------- phpmd --------------------
&& wget --no-hsts 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 \
@@ -452,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) \
@@ -569,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.+\)" \
@@ -601,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 \

View File

@@ -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 \
\
@@ -310,6 +310,12 @@ RUN set -eux \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
\
# -------------------- phpmd --------------------
&& wget --no-hsts 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 \
@@ -452,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) \
@@ -569,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.+\)" \
@@ -601,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 \

View File

@@ -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 \
\
@@ -310,6 +310,12 @@ RUN set -eux \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
\
# -------------------- phpmd --------------------
&& wget --no-hsts 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 \
@@ -452,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) \
@@ -569,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.+\)" \
@@ -601,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 \

View File

@@ -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,6 +311,12 @@ RUN set -eux \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
\
# -------------------- phpmd --------------------
&& wget --no-hsts 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 \
@@ -453,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) \
@@ -570,6 +577,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.+\)" \
@@ -602,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 \

View File

@@ -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 \
\
@@ -297,6 +297,12 @@ RUN set -eux \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
\
# -------------------- phpmd --------------------
&& wget --no-hsts 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 \
@@ -439,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) \
@@ -555,6 +562,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.+\)" \
@@ -587,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 \

View File

@@ -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 \
\
@@ -292,6 +292,12 @@ RUN set -eux \
&& chmod +x /usr/local/bin/phpcbf \
\
\
# -------------------- phpmd --------------------
&& wget --no-hsts 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 \
@@ -434,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) \
@@ -549,6 +556,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.+\)" \
@@ -581,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 \

View File

@@ -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 \
\
@@ -235,6 +235,12 @@ RUN set -eux \
&& chmod +x /usr/local/bin/phpcbf \
\
\
# -------------------- phpmd --------------------
&& wget --no-hsts 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 \
@@ -353,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) \
@@ -463,6 +470,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]+' \
@@ -490,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 \

View File

@@ -178,6 +178,7 @@ build-work:
# REBUILD TARGETS
# -------------------------------------------------------------------------------------------------
rebuild-base: _pull-root-image
rebuild-base: NO_CACHE=--no-cache
rebuild-base: build-base

View File

@@ -1056,6 +1056,10 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc
<td><a href="https://github.com/FriendsOfPHP/PHP-CS-Fixer">php-cs-fixer</a></td>
<td>A tool to automatically fix PHP Coding Standards issues.</td>
</tr>
<tr>
<td><a href="https://phpmd.org">phpmd</a></td>
<td>PHP Mess Detector.</td>
</tr>
<tr>
<td><a href="https://photoncms.com/resources/installing">photon</a></td>
<td>Photon CMS cli.</td>

View File

@@ -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 \

View File

@@ -811,34 +811,14 @@ extensions_available:
5.6:
type: pecl
version: 4.3.0
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
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)
# TODO: This is a nasty work-around to fix current phpredis implementation for PHP 8.0
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' \
sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \
&& phpize \
&& ./configure --enable-redis \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \

View File

@@ -102,6 +102,7 @@ software_enabled:
- phpcs
- phpcbf
- php-cs-fixer
- phpmd
- phpunit
- symfony
- wkhtmltopdf
@@ -571,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:
@@ -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 --no-hsts 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]+'