# Wordpress with nodejs, composer and PHP QA tools including Wordpress-Coding-Standards FROM wordpress # gpg keys listed at https://github.com/nodejs/node RUN set -ex \ && for key in \ 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ B9AE9905FFD7803F25714661B63B535A4C206CA9 \ 77984A986EBC2AA786BC0F66B01FBB92821C587A \ 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ FD3A5288F042B6850C66B31F09FE44734EB7990E \ 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ ; do \ gpg --keyserver pool.sks-keyservers.net --recv-keys "$key"; \ done ENV NPM_CONFIG_LOGLEVEL info ENV NODE_VERSION 10.13.0 # install nodejs, php composer and php sniffer RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ && curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ && grep " node-v$NODE_VERSION-linux-x64.tar.gz\$" SHASUMS256.txt.asc | sha256sum -c - \ && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ && rm "node-v$NODE_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer RUN apt-get update && apt-get install -y zlib1g-dev zip git RUN composer global require "squizlabs/php_codesniffer=*" RUN git clone git://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git /usr/share/php/PHP/CodeSniffer/Standards/WordPress RUN /root/.composer/vendor/bin/phpcs --config-set installed_paths /usr/share/php/PHP/CodeSniffer/Standards/WordPress