diff --git a/Dockerfile b/Dockerfile index f787f8c..9c837ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM drupal:9.3-php8.0-fpm +FROM drupal:9.3.15-php8.0 MAINTAINER devel@goalgorilla.com # Install packages. @@ -28,8 +28,9 @@ RUN docker-php-ext-install zip bcmath exif sockets # Install Composer. RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ - php composer-setup.php && \ - mv composer.phar /usr/local/bin/composer && \ + php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ + php composer-setup.php && \ + mv composer.phar /usr/local/bin/composer && \ php -r "unlink('composer-setup.php');" @@ -46,7 +47,7 @@ WORKDIR /var/www/html/ RUN chown -R www-data:www-data * # Install Drush launcher. -RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.4.2/drush.phar && \ +RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.10.1/drush.phar && \ chmod +x drush.phar && \ mv drush.phar /usr/local/bin/drush diff --git a/ci/Dockerfile b/ci/Dockerfile index 0c7bd88..b4cb354 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -1,4 +1,4 @@ -FROM goalgorilla/open_social_docker:latest +FROM goalgorilla/open_social_docker:d9 MAINTAINER devel@goalgorilla.com # Specify the work directory. @@ -20,7 +20,6 @@ RUN composer install --prefer-dist --no-interaction # Unfortunately, adding the composer vendor dir to the PATH doesn't seem to work. So: RUN ln -s /root/.composer/vendor/bin/behat /usr/local/bin/behat RUN ln -s /root/.composer/vendor/bin/phpunit /usr/local/bin/phpunit -RUN ln -s /var/www/vendor/bin/drupal /usr/local/bin/drupal ### CI SPECIFIC - END ### diff --git a/composer.json b/composer.json index e491d6a..3f89e76 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "drupal/redis": "^1.5", "drush/drush": "11.*@stable", "goalgorilla/open_social": "dev-feature/3260861-php-8-support-updated-branch", - "goalgorilla/open_social_scripts": "^3.0" + "goalgorilla/open_social_scripts": "dev-internal/update-docker" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "~0.7.1", @@ -37,14 +37,15 @@ "drupal/upgrade_status": "^3.11", "jcalderonzumba/gastonjs": "~1.2.0", "jcalderonzumba/mink-phantomjs-driver": "~0.3.3", - "phpstan/phpstan": "1.4.6", - "mglaman/phpstan-drupal": "1.1.12", + "phpstan/phpstan": "1.7.1", + "mglaman/phpstan-drupal": "1.1.17", "mikey179/vfsstream": "^1.6", "palantirnet/drupal-rector": "^0.12", "phpmd/phpmd": "^2.10", "phpspec/prophecy-phpunit": "^2.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "1.1.1", "slevomat/coding-standard": "^7.0", "squizlabs/html_codesniffer": "*", "symplify/easy-coding-standard": "^9.4" diff --git a/dev/Dockerfile b/dev/Dockerfile index 7e4ec11..f3c04f0 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -1,4 +1,4 @@ -FROM goalgorilla/open_social_docker:latest +FROM goalgorilla/open_social_docker:d9 MAINTAINER devel@goalgorilla.com ### CI SPECIFIC - START ### @@ -13,7 +13,6 @@ RUN composer install --prefer-dist --no-interaction # Unfortunately, adding the composer vendor dir to the PATH doesn't seem to work. So: RUN ln -s /root/.composer/vendor/bin/behat /usr/local/bin/behat RUN ln -s /root/.composer/vendor/bin/phpunit /usr/local/bin/phpunit -RUN ln -s /var/www/vendor/bin/drupal /usr/local/bin/drupal ### CI SPECIFIC - END ### @@ -37,6 +36,7 @@ RUN pecl install xdebug-3.1.1 && \ sed -i '1 a xdebug.idekey=PHPSTORMi' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini # Blackfire +# @todo Fix PHP 8 based blackfire installation RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && architecture=$(uname -m) \ && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \ @@ -48,11 +48,12 @@ RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ RUN php -r "opcache_reset();" +# @todo Remove these steps as it is not required for latest Docker desktop. # Contains the Mac hack to get the permissions to work for development. # Set user 1000 and group staff to www-data, enables write permission. # https://github.com/boot2docker/boot2docker/issues/581#issuecomment-114804894 -RUN usermod -u 1000 www-data -RUN usermod -G staff www-data +#RUN usermod -u 1000 www-data +#RUN usermod -G staff www-data ### DEV SPECIFIC - END ###