Skip to content

Update to Php 7.1 & cleanup #4

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

Merged
merged 1 commit into from
Sep 5, 2017
Merged
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
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.5
FROM alpine:3.6

ARG BUILD_DATE
ARG VCS_REF
Expand All @@ -11,7 +11,8 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/skilld-labs/docker-phpcs-drupal" \
maintainer="Andriy Yun <andriy.yun@gmail.com>, Andy Postnikov <apostnikov@gmail.com>"

RUN apk add --no-cache \
RUN set -e \
&& apk add --no-cache \
curl \
git \
patch \
Expand All @@ -23,17 +24,19 @@ RUN apk add --no-cache \
php7-opcache \
php7-openssl \
php7-phar \
php7-xml \
php7-simplexml \
php7-tokenizer \
php7-xmlwriter \
php7-zlib \
&& ln -s /usr/bin/php7 /usr/bin/php \
&& curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/bin \
&& composer global require drupal/coder \
&& ln -s /root/.composer/vendor/squizlabs/php_codesniffer/scripts/phpcs /usr/bin/phpcs \
&& ln -s /root/.composer/vendor/squizlabs/php_codesniffer/scripts/phpcbf /usr/bin/phpcbf \
&& composer global require drupal/coder --update-no-dev --no-suggest --prefer-dist ^8.2 \
&& 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 \
&& 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 \
&& 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/* \
Expand All @@ -43,4 +46,4 @@ RUN apk add --no-cache \
VOLUME /work
WORKDIR /work

CMD ["phpcs", "--standard=Drupal", "."]
CMD ["phpcs", "--standard=Drupal,DrupalPractice", "."]
4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/sh

docker build \
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 .
Expand Down
3 changes: 0 additions & 3 deletions php.ini

This file was deleted.