Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Alpine to 3.10 and phpmd-phpcpd #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.6
FROM alpine:3.10

ARG BUILD_DATE
ARG VCS_REF
Expand All @@ -19,28 +19,31 @@ RUN set -e \
php7 \
php7-apcu \
php7-ctype \
php7-dom \
php7-json \
php7-mbstring \
php7-opcache \
php7-openssl \
php7-phar \
php7-simplexml \
php7-tokenizer \
php7-xml \
php7-xmlwriter \
php7-zlib \
&& curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/bin \
&& composer global require drupal/coder --update-no-dev --no-suggest --prefer-dist ^8.2 \
&& composer global require drupal/coder ^8.3.2 phpmd/phpmd ^2 sebastian/phpcpd ^4 --update-no-dev --no-suggest --prefer-dist \
&& ln -s /root/.composer/vendor/bin/phpcs /usr/bin/phpcs \
&& ln -s /root/.composer/vendor/bin/phpcbf /usr/bin/phpcbf \
&& ln -s /root/.composer/vendor/drupal/coder/coder_sniffer/Drupal /root/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Drupal \
&& ln -s /root/.composer/vendor/drupal/coder/coder_sniffer/DrupalPractice /root/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/DrupalPractice \
&& ln -s /root/.composer/vendor/bin/phpmd /usr/bin/phpmd \
&& ln -s /root/.composer/vendor/bin/phpcpd /usr/bin/phpcpd \
&& ln -s /root/.composer/vendor/drupal/coder/coder_sniffer/Drupal /root/.composer/vendor/squizlabs/php_codesniffer/src/Standards/Drupal \
&& ln -s /root/.composer/vendor/drupal/coder/coder_sniffer/DrupalPractice /root/.composer/vendor/squizlabs/php_codesniffer/src/Standards/DrupalPractice \
&& cd /root/.composer/vendor/drupal/coder && curl https://www.drupal.org/files/issues/2857856-8.patch | patch -p1 && cd \
&& git clone --branch master https://git.drupal.org/sandbox/coltrane/1921926.git /root/drupalsecure_code_sniffs \
&& git clone --branch master https://git.drupalcode.org/sandbox/coltrane-1921926.git /root/drupalsecure_code_sniffs \
&& rm -rf /root/drupalsecure_code_sniffs/.git \
&& cd /root/drupalsecure_code_sniffs && curl https://www.drupal.org/files/issues/parenthesis_closer_notice-2320623-2.patch | git apply && cd \
&& apk del --no-cache git \
&& rm -rf /root/.composer/cache/* \
&& ln -s /root/drupalsecure_code_sniffs/DrupalSecure /root/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/DrupalSecure \
&& ln -s /root/drupalsecure_code_sniffs/DrupalSecure /root/.composer/vendor/squizlabs/php_codesniffer/src/Standards/DrupalSecure \
&& sed -i "s/.*memory_limit = .*/memory_limit = -1/" /etc/php7/php.ini

VOLUME /work
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e -x
docker build --pull \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
-t skilldlabs/docker-phpcs-drupal .
-t skilldlabs/docker-phpcs-drupal:next .

docker build --pull \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
Expand Down