drupalwxt / docker-scaffold Goto Github PK
View Code? Open in Web Editor NEWDocker Scaffold for Drupal WxT
Docker Scaffold for Drupal WxT
Not sure if this is a scaffold issue; but guessing it is.
We have recently upgraded to WxT 4.4.0 and the upgrade went surprisingly well. Local devs have site up and running both in a native environment (apache/mysql/etc running natively) as well as in a docker container.
But our github action to build no longer works. It fails in the build script that comes from docker-scaffold. It fails at nearly the last line:
RUN chown -R www-data:www-data sites/default
due to that folder not being there.
If i comment out that line then the build script completes and the image is available. Looking at the image and sure enough that folder (and some other files/folders) are not there.
Flipping back to WxT 4.3.4 and build works fine.
We have been running off a forked version of this repo and a branch off the 9.1.x branch (possibly). But i switched back to use this repo and running off the 9.4.x branch and build still fails at the same point.
Any thoughts on how WxT 4.4.x is tied to a specific version of the scaffold and what could be causing what seems like a failure to create folders?
I'm using the latest version of docker compose, and running a docker compose up -d
now results in:
service "web" can't be used with `extends` as it declare `depends_on`
make: *** [docker/Makefile:63: docker_start] Error 15
Looks like docker compose 2.24.6 introduces this breaking change, see related issue - docker/compose#11544
I forgot to add this a couple weeks ago. We noticed in our CI that phpunit was updated and caused warnings or errors on the filter tag in the phpunit.conf. We use our own "version" of this scaffolding and thought you may want to take the change.
https://github.com/drupalwxt/docker-scaffold/blob/9.1.x/conf/phpunit.xml
see https://github.com/sebastianbergmann/phpunit/blob/9.3.11/ChangeLog-9.3.md under "Configuration of Code Coverage and Logging in phpunit.xml"
Here is our updated file...
<?xml version="1.0" encoding="UTF-8"?>
<!-- TODO set checkForUnintentionallyCoveredCode="true" once https://www.drupal.org/node/2626832 is resolved. -->
<!-- PHPUnit expects functional tests to be run with either a privileged user
or your current system user. See core/tests/README.md and
https://www.drupal.org/node/2116263 for details.
-->
<phpunit bootstrap="tests/bootstrap.php" colors="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutChangesToGlobalState="true">
<!-- TODO set printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter" once
https://youtrack.jetbrains.com/issue/WI-24808 is resolved. Drupal provides a
result printer that links to the html output results for functional tests.
Unfortunately, this breaks the output of PHPStorm's PHPUnit runner. However, if
using the command line you can add
- -printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" to use it (note there
should be no spaces between the hyphens).
-->
<php>
<!-- Set error reporting to E_ALL. -->
<ini name="error_reporting" value="32767"/>
<!-- Do not limit the amount of memory tests take to run. -->
<ini name="memory_limit" value="-1"/>
<!-- Example SIMPLETEST_BASE_URL value: http://localhost -->
<env name="SIMPLETEST_BASE_URL" value="http://drupal.dev/"/>
<!-- Example SIMPLETEST_DB value: mysql://username:password@localhost/databasename#table_prefix -->
<!-- We will pass the SIMPLETEST_DB as an evironment variable to our cli container as it contains a site specific database" />-->
<!-- Example BROWSERTEST_OUTPUT_DIRECTORY value: /path/to/webroot/sites/simpletest/browser_output -->
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value=""/>
<!-- To disable deprecation testing uncomment the next line. -->
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
<!-- Example for changing the driver class for mink tests MINK_DRIVER_CLASS value: 'Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver' -->
<!-- Example for changing the driver args to mink tests MINK_DRIVER_ARGS value: '["http://127.0.0.1:8510"]' -->
<!-- Example for changing the driver args to phantomjs tests MINK_DRIVER_ARGS_PHANTOMJS value: '["http://127.0.0.1:8510"]' -->
<!-- Example for changing the driver args to webdriver tests MINK_DRIVER_ARGS_WEBDRIVER value: '["firefox", null, "http://localhost:4444/wd/hub"]' -->
</php>
<testsuites>
<testsuite name="unit">
<file>./tests/TestSuites/UnitTestSuite.php</file>
</testsuite>
<testsuite name="kernel">
<file>./tests/TestSuites/KernelTestSuite.php</file>
</testsuite>
<testsuite name="functional">
<file>./tests/TestSuites/FunctionalTestSuite.php</file>
</testsuite>
<testsuite name="functional-javascript">
<file>./tests/TestSuites/FunctionalJavascriptTestSuite.php</file>
</testsuite>
</testsuites>
<listeners>
<listener class="\Drupal\Tests\Listeners\DrupalListener">
</listener>
<!-- The Symfony deprecation listener has to come after the Drupal listener -->
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener">
</listener>
</listeners>
<!-- Filter for coverage reports. -->
<coverage includeUncoveredFiles="true"
processUncoveredFiles="true"
ignoreDeprecatedCodeUnits="true"
disableCodeCoverageIgnore="true">
<include>
<directory>./includes</directory>
<directory>./lib</directory>
<directory>./modules</directory>
<directory>../modules</directory>
<directory>../sites</directory>
<directory>../profiles</directory>
</include>
<!-- By definition test classes have no tests. -->
<exclude>
<directory suffix="Test.php">./</directory>
<directory suffix="TestBase.php">./</directory>
</exclude>
<report>
<clover outputFile="clover.xml"/>
<crap4j outputFile="crap4j.xml" threshold="50"/>
<html outputDirectory="html-coverage" lowUpperBound="50" highLowerBound="90"/>
<php outputFile="coverage.php"/>
<text outputFile="coverage.txt" showUncoveredFiles="false" showOnlySummary="true"/>
<xml outputDirectory="xml-coverage"/>
</report>
</coverage>
</phpunit>
As of June 22 2021 the build is breaking with
#8 [ 4/24] RUN apk --update add --no-cache bash=5.0.17-r0 git gzip=1.10-r0 mysql-client patch=2.7.6-r6 postgresql-client ssmtp=2.64-r14 zlib-dev=1.2.11-r3
#8 sha256:c228ac0bf12c0852e2c79c4d7cf4018219d5a9890eeee4444accc6890ec3e4c3
#8 0.303 fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
#8 0.487 fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
#8 0.982 ERROR: unable to select packages:
#8 0.996 patch-2.7.6-r7:
#8 0.996 breaks: world[patch=2.7.6-r6]
#8 ERROR: executor failed running [/bin/sh -c apk --update add --no-cache bash=5.0.17-r0 git gzip=1.10-r0 mysql-client patch=2.7.6-r6 postgresql-client ssmtp=2.64-r14 zlib-dev=1.2.11-r3]: exit code: 1
------
> [ 4/24] RUN apk --update add --no-cache bash=5.0.17-r0 git gzip=1.10-r0 mysql-client patch=2.7.6-r6 postgresql-client ssmtp=2.64-r14 zlib-dev=1.2.11-r3:
------
executor failed running [/bin/sh -c apk --update add --no-cache bash=5.0.17-r0 git gzip=1.10-r0 mysql-client patch=2.7.6-r6 postgresql-client ssmtp=2.64-r14 zlib-dev=1.2.11-r3]: exit code: 1
make: *** [base] Error 1
docker/Makefile:10: recipe for target 'base' failed
Error: Process completed with exit code 2.
Updating to patch=2.7.6-r7 resolve this issue. This is an urgent issue that is breaking our build. Created a pull request to fix.
I am trying to build site-wxt 9.2.x and get the following error. I recently deleted all my containers and images, I suspect this was something recently changed in the upstream containers we use that caused issue.
+ strip --strip-all modules/zip.so
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20200930/
warning: zip (zip.so) is already loaded!
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp.la modules/* libs/*
rm -f ext/opcache/jit/zend_jit_x86.c
(1/6) Purging .phpize-deps-configure (20220131.172902)
(2/6) Purging dpkg-dev (1.20.9-r0)
(3/6) Purging dpkg (1.20.9-r0)
(4/6) Purging file (5.41-r0)
(5/6) Purging re2c (2.1.1-r0)
(6/6) Purging libmagic (5.41-r0)
Executing busybox-1.34.1-r3.trigger
OK: 335 MiB in 89 packages
No releases available for package "pecl.php.net/mysqlnd_azure"
install failed
The command '/bin/sh -c apk add --update --no-cache autoconf icu icu-libs libzip-dev gcc g++ make libffi-dev openssl-dev; apk add --no-cache --virtual .build-deps icu-dev; docker-php-ext-configure zip --with-zlib-dir=/usr; docker-php-ext-install -j "$(nproc)" bcmath intl zip; docker-php-source extract && pecl install mysqlnd_azure && docker-php-ext-enable mysqlnd_azure && docker-php-source delete && mkdir -p /etc/ssl/mysql apk del .build-deps' returned a non-zero code: 1
make: *** [docker/Makefile:10: base] Error 1
In our internal containers we are using this to install additional php libraries.
Note that it currently produces warnings, but does seem to work and install what is needed.
hello,
I'm trying to install this using Windows 10 WSL2 Ubuntu 20 image.
when I tried export COMPOSER_MEMORY_LIMIT=-1 && composer install
, I get the following error:
Composer could not find a composer.json file in /home/lawrence/docker
To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage
PHP Fatal error: Uncaught Error: Call to undefined method Composer\Console\Application::areExceptionsCaught() in phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:422
Stack trace:
#0 phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/BaseCommand.php(63): Composer\Console\Application->getComposer()
#1 phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/InstallCommand.php(96): Composer\Command\BaseCommand->getComposer()
#2 phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Command/Command.php(245): Composer\Command\InstallCommand->execute()
#3 phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run()
#4 phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand()
#5 phar:///mnt/c/ProgramData/ComposerSetup/bin/comp in phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php on line 422
Fatal error: Uncaught Error: Call to undefined method Composer\Console\Application::areExceptionsCaught() in phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:422
Stack trace:
#0 phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/BaseCommand.php(63): Composer\Console\Application->getComposer()
#1 phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/InstallCommand.php(96): Composer\Command\BaseCommand->getComposer()
#2 phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Command/Command.php(245): Composer\Command\InstallCommand->execute()
#3 phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run()
#4 phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand()
#5 phar:///mnt/c/ProgramData/ComposerSetup/bin/comp in phar:///mnt/c/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php on line 422
any advice on how to resolve this? tks.
in docker-compose.yml file,
container cli_scripts build from docker/images/ci.
and we have another
cli container build from docker/images/cli.
Would container cli_scripts be container ci_scripts? Please clarified this.
I was trying to build our containers this morning and ran into the following warnings and errors when running a docker compose build:
=> ERROR [site-ndm_web 11/12] RUN apk add --update --no-cache shadow@community; addgroup staff; usermod -u 1000 www-data; usermod -G staff www-data 10.7s
------
> [site-ndm_web 11/12] RUN apk add --update --no-cache shadow@community; addgroup staff; usermod -u 1000 www-data; usermod -G staff www-data:
#0 0.550 fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
#0 4.808 fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
#0 5.793 fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
#0 10.51 WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/edge/community: UNTRUSTED signature
#0 10.60 WARNING: The repository tag for world dependency 'shadow@community' does not exist
#0 10.60 ERROR: Not committing changes due to missing repository tags. Use --force-broken-world to override.
#0 10.64 /bin/sh: usermod: not found
#0 10.64 /bin/sh: usermod: not found
------
failed to solve: executor failed running [/bin/sh -c apk add --update --no-cache shadow@community; addgroup staff; usermod -u 1000 www-data; usermod -G staff www-data]: exit code: 127
make: *** [docker/Makefile:88: docker_build] Error 17
It appears to be the from the code here .: https://github.com/drupalwxt/docker-scaffold/blob/9.3.x/images/dev/Dockerfile#L35
After trying a few things, I just removed the Mac work around. Unfortunately I don't have a Mac to test and just thought I would let you know. Assuming there is a fix for this and it's tracked here, I may include it back in our docker scaffold repo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.