From 77065dae14b77e37576ba240cd51e0b0190ffa2b Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Wed, 16 Jan 2019 09:54:13 -0800 Subject: [PATCH 1/7] Installing ssh2 PHP extension from Pecl for PHP 7.x (alpha state) --- 7.0/Dockerfile | 5 ++--- 7.1/Dockerfile | 5 ++--- 7.2/Dockerfile | 7 ++----- 7.3/Dockerfile | 7 ++----- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/7.0/Dockerfile b/7.0/Dockerfile index fdca3b39..40701bde 100644 --- a/7.0/Dockerfile +++ b/7.0/Dockerfile @@ -163,9 +163,6 @@ RUN set -xe; \ libzip4 \ msodbcsql17 \ ;\ - # SSH2 must be installed from source - git clone https://github.com/php/pecl-networking-ssh2.git /usr/src/php/ext/ssh2 && rm -rf /usr/src/php/ext/ssh2/.git; \ - \ docker-php-ext-configure >/dev/null gd \ --with-freetype-dir=/usr/include/ \ --with-jpeg-dir=/usr/include/ \ @@ -210,6 +207,7 @@ RUN set -xe; \ pdo_sqlsrv \ redis \ sqlsrv \ + ssh2-1.1.2 \ xdebug \ ;\ docker-php-ext-enable \ @@ -220,6 +218,7 @@ RUN set -xe; \ pdo_sqlsrv \ redis \ sqlsrv \ + ssh2 \ ;\ # Disable xdebug by default rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \ diff --git a/7.1/Dockerfile b/7.1/Dockerfile index 8c9e8379..2bd31bb7 100644 --- a/7.1/Dockerfile +++ b/7.1/Dockerfile @@ -163,9 +163,6 @@ RUN set -xe; \ libzip4 \ msodbcsql17 \ ;\ - # SSH2 must be installed from source - git clone https://github.com/php/pecl-networking-ssh2.git /usr/src/php/ext/ssh2 && rm -rf /usr/src/php/ext/ssh2/.git; \ - \ docker-php-ext-configure >/dev/null gd \ --with-freetype-dir=/usr/include/ \ --with-jpeg-dir=/usr/include/ \ @@ -210,6 +207,7 @@ RUN set -xe; \ pdo_sqlsrv \ redis \ sqlsrv \ + ssh2-1.1.2 \ xdebug \ ;\ docker-php-ext-enable \ @@ -220,6 +218,7 @@ RUN set -xe; \ pdo_sqlsrv \ redis \ sqlsrv \ + ssh2 \ ;\ # Disable xdebug by default rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \ diff --git a/7.2/Dockerfile b/7.2/Dockerfile index a8a37fc7..0a3967b3 100644 --- a/7.2/Dockerfile +++ b/7.2/Dockerfile @@ -163,11 +163,6 @@ RUN set -xe; \ libzip4 \ msodbcsql17 \ ;\ - # SSH2 must be installed from source - git clone https://github.com/php/pecl-networking-ssh2.git /usr/src/php/ext/ssh2 && rm -rf /usr/src/php/ext/ssh2/.git; \ - # XDEBUG must be installed from source - git clone https://github.com/xdebug/xdebug.git /usr/src/php/ext/xdebug && rm -rf /usr/src/php/ext/xdebug/.git; \ - \ docker-php-ext-configure >/dev/null gd \ --with-freetype-dir=/usr/include/ \ --with-jpeg-dir=/usr/include/ \ @@ -213,6 +208,7 @@ RUN set -xe; \ pdo_sqlsrv \ redis \ sqlsrv \ + ssh2-1.1.2 \ ;\ docker-php-ext-enable \ apcu \ @@ -222,6 +218,7 @@ RUN set -xe; \ pdo_sqlsrv \ redis \ sqlsrv \ + ssh2 \ ;\ # Disable xdebug by default rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \ diff --git a/7.3/Dockerfile b/7.3/Dockerfile index 22cf336c..67c78269 100644 --- a/7.3/Dockerfile +++ b/7.3/Dockerfile @@ -162,11 +162,6 @@ RUN set -xe; \ libzip4 \ msodbcsql17 \ ;\ - # SSH2 must be installed from source - git clone https://github.com/php/pecl-networking-ssh2.git /usr/src/php/ext/ssh2 && rm -rf /usr/src/php/ext/ssh2/.git; \ - # XDEBUG must be installed from source - git clone https://github.com/xdebug/xdebug.git /usr/src/php/ext/xdebug && rm -rf /usr/src/php/ext/xdebug/.git; \ - \ docker-php-ext-configure >/dev/null gd \ --with-freetype-dir=/usr/include/ \ --with-jpeg-dir=/usr/include/ \ @@ -213,6 +208,7 @@ RUN set -xe; \ #pdo_sqlsrv \ redis \ #sqlsrv \ + ssh2-1.1.2 \ ;\ docker-php-ext-enable \ apcu \ @@ -223,6 +219,7 @@ RUN set -xe; \ #pdo_sqlsrv \ redis \ #sqlsrv \ + ssh2 \ ;\ # Disable xdebug by default rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \ From f38458a25cee4782e1e3c680319d7a9bfc4b0823 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Wed, 16 Jan 2019 10:07:26 -0800 Subject: [PATCH 2/7] xdebug PHP extension updates - No need to disable xdebug at build time, since it's not enabled by default - Install xdebug (stable) from Pecl for PHP 7.2 - Install xdebug (2.7.0beta1) from Pecl for PHP 7.3 --- 5.6/Dockerfile | 2 -- 7.0/Dockerfile | 2 -- 7.1/Dockerfile | 2 -- 7.2/Dockerfile | 4 +--- 7.3/Dockerfile | 5 ++--- 5 files changed, 3 insertions(+), 12 deletions(-) diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 6e87e9fd..9cb4e882 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -213,8 +213,6 @@ RUN set -xe; \ redis \ ssh2 \ ;\ - # Disable xdebug by default - rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \ # Cleanup docker-php-source delete; \ rm -rf /tmp/pear ~/.pearrc; \ diff --git a/7.0/Dockerfile b/7.0/Dockerfile index 40701bde..8dafffbf 100644 --- a/7.0/Dockerfile +++ b/7.0/Dockerfile @@ -220,8 +220,6 @@ RUN set -xe; \ sqlsrv \ ssh2 \ ;\ - # Disable xdebug by default - rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \ # Cleanup docker-php-source delete; \ rm -rf /tmp/pear ~/.pearrc; \ diff --git a/7.1/Dockerfile b/7.1/Dockerfile index 2bd31bb7..996f15d7 100644 --- a/7.1/Dockerfile +++ b/7.1/Dockerfile @@ -220,8 +220,6 @@ RUN set -xe; \ sqlsrv \ ssh2 \ ;\ - # Disable xdebug by default - rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \ # Cleanup docker-php-source delete; \ rm -rf /tmp/pear ~/.pearrc; \ diff --git a/7.2/Dockerfile b/7.2/Dockerfile index 0a3967b3..4dbbce60 100644 --- a/7.2/Dockerfile +++ b/7.2/Dockerfile @@ -194,7 +194,6 @@ RUN set -xe; \ soap \ sockets \ ssh2 \ - xdebug \ xsl \ zip \ ;\ @@ -209,6 +208,7 @@ RUN set -xe; \ redis \ sqlsrv \ ssh2-1.1.2 \ + xdebug \ ;\ docker-php-ext-enable \ apcu \ @@ -220,8 +220,6 @@ RUN set -xe; \ sqlsrv \ ssh2 \ ;\ - # Disable xdebug by default - rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \ # Cleanup docker-php-source delete; \ rm -rf /tmp/pear ~/.pearrc; \ diff --git a/7.3/Dockerfile b/7.3/Dockerfile index 67c78269..ccb63bf2 100644 --- a/7.3/Dockerfile +++ b/7.3/Dockerfile @@ -193,7 +193,6 @@ RUN set -xe; \ soap \ sockets \ ssh2 \ - xdebug \ xsl \ zip \ ;\ @@ -209,6 +208,8 @@ RUN set -xe; \ redis \ #sqlsrv \ ssh2-1.1.2 \ + # There is currently no stable pecl release of xdebug for PHP 7.3 + xdebug-2.7.0beta1 \ ;\ docker-php-ext-enable \ apcu \ @@ -221,8 +222,6 @@ RUN set -xe; \ #sqlsrv \ ssh2 \ ;\ - # Disable xdebug by default - rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \ # Cleanup docker-php-source delete; \ rm -rf /tmp/pear ~/.pearrc; \ From dd7adb5538d3022660ddd72a3312d37ebc220631 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Wed, 16 Jan 2019 10:09:00 -0800 Subject: [PATCH 3/7] Removed mcrypt libraries from PHP 7.2 and 7.3 --- 7.1/Dockerfile | 1 + 7.2/Dockerfile | 5 ++--- 7.3/Dockerfile | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/7.1/Dockerfile b/7.1/Dockerfile index 996f15d7..04c5b23d 100644 --- a/7.1/Dockerfile +++ b/7.1/Dockerfile @@ -184,6 +184,7 @@ RUN set -xe; \ imap \ intl \ ldap \ + # mcrypt is deprecated in 7.1 and removed in 7.2. See Deprecated features. mcrypt \ mysqli \ opcache \ diff --git a/7.2/Dockerfile b/7.2/Dockerfile index 4dbbce60..44e7d586 100644 --- a/7.2/Dockerfile +++ b/7.2/Dockerfile @@ -125,7 +125,6 @@ RUN set -xe; \ libldap2-dev \ libmagickcore-dev \ libmagickwand-dev \ - libmcrypt-dev \ libmemcached-dev \ libmhash-dev \ libpng-dev \ @@ -151,7 +150,6 @@ RUN set -xe; \ libldap-2.4-2 \ libmagickcore-6.q16-3 \ libmagickwand-6.q16-3 \ - libmcrypt4 \ libmemcached11 \ libmemcachedutil2 \ libmhash2 \ @@ -184,7 +182,8 @@ RUN set -xe; \ imap \ intl \ ldap \ - # mcrypt is removed from 7.2. See Deprecated features + # mcrypt is deprecated in 7.1 and removed in 7.2. See Deprecated features. + # mcrypt \ mysqli \ opcache \ pcntl \ diff --git a/7.3/Dockerfile b/7.3/Dockerfile index ccb63bf2..5d593b22 100644 --- a/7.3/Dockerfile +++ b/7.3/Dockerfile @@ -125,7 +125,6 @@ RUN set -xe; \ libldap2-dev \ libmagickcore-dev \ libmagickwand-dev \ - libmcrypt-dev \ libmemcached-dev \ libmhash-dev \ libpng-dev \ @@ -150,7 +149,6 @@ RUN set -xe; \ libldap-2.4-2 \ libmagickcore-6.q16-3 \ libmagickwand-6.q16-3 \ - libmcrypt4 \ libmemcached11 \ libmemcachedutil2 \ libmhash2 \ @@ -183,7 +181,8 @@ RUN set -xe; \ imap \ intl \ ldap \ - # mcrypt is removed from 7.2. See Deprecated features + # mcrypt is deprecated in 7.1 and removed in 7.2. See Deprecated features. + # mcrypt \ mysqli \ opcache \ pcntl \ From 017b3910337fa5504d823b8b42ab9174d3525990 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Wed, 16 Jan 2019 10:09:50 -0800 Subject: [PATCH 4/7] Updated comments for sqlsrv extension state in PHP 7.3 --- 7.3/Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/7.3/Dockerfile b/7.3/Dockerfile index 5d593b22..39ea384b 100644 --- a/7.3/Dockerfile +++ b/7.3/Dockerfile @@ -202,10 +202,9 @@ RUN set -xe; \ imagick \ # Use memcached (not memcache) for PHP 7.x memcached \ - # sqlsrv is currently not supported in PHP 7.3 - #pdo_sqlsrv \ + #pdo_sqlsrv - currently not supported in PHP 7.3 redis \ - #sqlsrv \ + #sqlsrv - currently not supported in PHP 7.3 ssh2-1.1.2 \ # There is currently no stable pecl release of xdebug for PHP 7.3 xdebug-2.7.0beta1 \ @@ -215,10 +214,9 @@ RUN set -xe; \ gnupg \ imagick \ memcached \ - # sqlsrv is currently not supported in PHP 7.3 - #pdo_sqlsrv \ + #pdo_sqlsrv - currently not supported in PHP 7.3 redis \ - #sqlsrv \ + #sqlsrv - currently not supported in PHP 7.3 ssh2 \ ;\ # Cleanup From 834dbe9f64436cf1b5d36f3833343f14b10d2705 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Wed, 16 Jan 2019 10:57:25 -0800 Subject: [PATCH 5/7] Fix ssh2 extension installation for PHP 7.x --- 7.0/Dockerfile | 1 - 7.1/Dockerfile | 1 - 7.2/Dockerfile | 1 - 7.3/Dockerfile | 1 - 4 files changed, 4 deletions(-) diff --git a/7.0/Dockerfile b/7.0/Dockerfile index 8dafffbf..666aed1b 100644 --- a/7.0/Dockerfile +++ b/7.0/Dockerfile @@ -193,7 +193,6 @@ RUN set -xe; \ pgsql \ soap \ sockets \ - ssh2 \ xsl \ zip \ ;\ diff --git a/7.1/Dockerfile b/7.1/Dockerfile index 04c5b23d..54c7f301 100644 --- a/7.1/Dockerfile +++ b/7.1/Dockerfile @@ -194,7 +194,6 @@ RUN set -xe; \ pgsql \ soap \ sockets \ - ssh2 \ xsl \ zip \ ;\ diff --git a/7.2/Dockerfile b/7.2/Dockerfile index 44e7d586..33ebd18c 100644 --- a/7.2/Dockerfile +++ b/7.2/Dockerfile @@ -192,7 +192,6 @@ RUN set -xe; \ pgsql \ soap \ sockets \ - ssh2 \ xsl \ zip \ ;\ diff --git a/7.3/Dockerfile b/7.3/Dockerfile index 39ea384b..e8e805ce 100644 --- a/7.3/Dockerfile +++ b/7.3/Dockerfile @@ -191,7 +191,6 @@ RUN set -xe; \ pgsql \ soap \ sockets \ - ssh2 \ xsl \ zip \ ;\ From 4ec6f72253f5653ec2f82fd40b382745092420c5 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Wed, 16 Jan 2019 12:00:24 -0800 Subject: [PATCH 6/7] Updated tests - Using "run _healthcheck_wait" so bats prints output from it in case the healthcheck fails - Simplified cron test, as it was failing sporadically - Simplified phpcs test, as it was failing sporadically --- cloud9/tests/test.bats | 4 +- tests/.docksal/services/cli/crontab | 2 +- tests/test.bats | 94 ++++++++++++++++++----------- 3 files changed, 63 insertions(+), 37 deletions(-) diff --git a/cloud9/tests/test.bats b/cloud9/tests/test.bats index f5a06e2c..adb4fa37 100755 --- a/cloud9/tests/test.bats +++ b/cloud9/tests/test.bats @@ -65,7 +65,9 @@ _healthcheck_wait () ### Setup ### make start - _healthcheck_wait + + run _healthcheck_wait + unset output # This is a dirty hack to get tests to pass on Travis. # TODO: This should be replaced with a proper Cloud9 healthcheck in Dockerfile sleep 10 diff --git a/tests/.docksal/services/cli/crontab b/tests/.docksal/services/cli/crontab index 389f5c04..82d24cee 100644 --- a/tests/.docksal/services/cli/crontab +++ b/tests/.docksal/services/cli/crontab @@ -1 +1 @@ -* * * * * echo "The current date is $(date)" >> /tmp/date.txt +* * * * * echo "The current date is $(date)" > /tmp/date.txt diff --git a/tests/test.bats b/tests/test.bats index 3dd25341..90fcdca2 100755 --- a/tests/test.bats +++ b/tests/test.bats @@ -65,7 +65,9 @@ _healthcheck_wait () ### Setup ### make start - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -117,7 +119,9 @@ _healthcheck_wait () -v $(pwd)/../tests/docroot:/var/www/docroot \ "$IMAGE" docker cp $(pwd)/../tests/scripts "$NAME:/var/www/" - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -173,7 +177,9 @@ _healthcheck_wait () ### Setup ### make start -e ENV='-e XDEBUG_ENABLED=1' - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -201,7 +207,9 @@ _healthcheck_wait () ### Setup ### make start - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -257,7 +265,9 @@ _healthcheck_wait () ### Setup ### make start - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -285,7 +295,9 @@ _healthcheck_wait () ### Setup ### make start - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -308,7 +320,9 @@ _healthcheck_wait () ### Setup ### make start - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -331,7 +345,9 @@ _healthcheck_wait () ### Setup ### make start - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -360,7 +376,9 @@ _healthcheck_wait () ### Setup ### make start -e ENV="-e SECRET_SSH_PRIVATE_KEY" - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -381,7 +399,9 @@ _healthcheck_wait () [[ $SKIP == 1 ]] && skip make start - _healthcheck_wait + + run _healthcheck_wait + unset output run docker exec -u docker "${NAME}" cat /tmp/test-startup.txt [[ ${status} == 0 ]] @@ -404,7 +424,9 @@ _healthcheck_wait () ### Setup ### make start -e ENV='-e SECRET_ACAPI_EMAIL -e SECRET_ACAPI_KEY' - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -442,7 +464,9 @@ _healthcheck_wait () ### Setup ### make start -e ENV='-e SECRET_PLATFORMSH_CLI_TOKEN' - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -475,7 +499,9 @@ _healthcheck_wait () ### Setup ### make start -e ENV='-e SECRET_TERMINUS_TOKEN' - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -505,21 +531,15 @@ _healthcheck_wait () ### Setup ### make start - _healthcheck_wait - ### Tests ### - # Confirm output from cron is working - - # Create tmp date file and confirm it's empty - docker exec -u docker "$NAME" bash -lc 'touch /tmp/date.txt' - run docker exec -u docker "$NAME" bash -lc 'cat /tmp/date.txt' - [[ "${output}" == "" ]] + run _healthcheck_wait unset output - # Sleep for 60+1 seconds so cron can run again. - sleep 61 + ### Tests ### - # Confirm cron has ran and file contents has changed + # Give cron 60s to invoke the scheduled test job + sleep 60 + # Confirm cron has run and file contents has changed run docker exec -u docker "$NAME" bash -lc 'tail -1 /tmp/date.txt' [[ "${output}" =~ "The current date is " ]] unset output @@ -533,7 +553,9 @@ _healthcheck_wait () ### Setup ### make start -e ENV='-e GIT_USER_EMAIL=git@example.com -e GIT_USER_NAME="Docksal CLI"' - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### @@ -555,19 +577,19 @@ _healthcheck_wait () ### Setup ### make start - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### # Check PHPCS libraries loaded - run docker exec -u docker "$NAME" bash -lc 'phpcs -i' - [[ "${output}" =~ (" DrupalPractice "|" DrupalPractice,"|" DrupalPractice"$) ]] - [[ "${output}" =~ (" Drupal "|" Drupal,"|" Drupal"$) ]] - [[ "${output}" =~ (" WordPress-VIP "|" WordPress-VIP,"|" WordPress-VIP"$) ]] - [[ "${output}" =~ (" WordPress-Core "|" WordPress-Core,"|" WordPress-Core"$) ]] - [[ "${output}" =~ (" WordPress-Extra "|" WordPress-Extra,"|" WordPress-Extra"$) ]] - [[ "${output}" =~ (" WordPress-Docs "|" WordPress-Docs,"|" WordPress-Docs"$) ]] - [[ "${output}" =~ (" WordPress "|" WordPress,"|" WordPress"$) ]] + # Normalize the output from phpcs -i so it's easier to do matches + run docker exec -u docker "$NAME" bash -lc "phpcs -i | sed 's/,//g'" + output="${output} " + [[ "${output}" =~ " Drupal " ]] + [[ "${output}" =~ " DrupalPractice " ]] + [[ "${output}" =~ " WordPress " ]] # Includes WordPress-Core, WordPress-Docs and WordPress-Extra unset output ### Cleanup ### @@ -579,7 +601,9 @@ _healthcheck_wait () ### Setup ### make start - _healthcheck_wait + + run _healthcheck_wait + unset output ### Tests ### From d1fe14c334d574bc8cd02a4d2ada3d3bd3f56bfe Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Wed, 16 Jan 2019 14:10:42 -0800 Subject: [PATCH 7/7] Install ssh2 ext from source for PHP 7.x pecl releases are old and won't work for PHP 7.3, so installing from source for all PHP 7 versions --- 7.0/Dockerfile | 6 ++++-- 7.1/Dockerfile | 6 ++++-- 7.2/Dockerfile | 6 ++++-- 7.3/Dockerfile | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/7.0/Dockerfile b/7.0/Dockerfile index 666aed1b..c8c040bf 100644 --- a/7.0/Dockerfile +++ b/7.0/Dockerfile @@ -163,6 +163,9 @@ RUN set -xe; \ libzip4 \ msodbcsql17 \ ;\ + # SSH2 must be installed from source for PHP 7.x + git clone https://github.com/php/pecl-networking-ssh2.git /usr/src/php/ext/ssh2 && rm -rf /usr/src/php/ext/ssh2/.git; \ + \ docker-php-ext-configure >/dev/null gd \ --with-freetype-dir=/usr/include/ \ --with-jpeg-dir=/usr/include/ \ @@ -193,6 +196,7 @@ RUN set -xe; \ pgsql \ soap \ sockets \ + ssh2 \ xsl \ zip \ ;\ @@ -206,7 +210,6 @@ RUN set -xe; \ pdo_sqlsrv \ redis \ sqlsrv \ - ssh2-1.1.2 \ xdebug \ ;\ docker-php-ext-enable \ @@ -217,7 +220,6 @@ RUN set -xe; \ pdo_sqlsrv \ redis \ sqlsrv \ - ssh2 \ ;\ # Cleanup docker-php-source delete; \ diff --git a/7.1/Dockerfile b/7.1/Dockerfile index 54c7f301..48b7dd24 100644 --- a/7.1/Dockerfile +++ b/7.1/Dockerfile @@ -163,6 +163,9 @@ RUN set -xe; \ libzip4 \ msodbcsql17 \ ;\ + # SSH2 must be installed from source for PHP 7.x + git clone https://github.com/php/pecl-networking-ssh2.git /usr/src/php/ext/ssh2 && rm -rf /usr/src/php/ext/ssh2/.git; \ + \ docker-php-ext-configure >/dev/null gd \ --with-freetype-dir=/usr/include/ \ --with-jpeg-dir=/usr/include/ \ @@ -194,6 +197,7 @@ RUN set -xe; \ pgsql \ soap \ sockets \ + ssh2 \ xsl \ zip \ ;\ @@ -207,7 +211,6 @@ RUN set -xe; \ pdo_sqlsrv \ redis \ sqlsrv \ - ssh2-1.1.2 \ xdebug \ ;\ docker-php-ext-enable \ @@ -218,7 +221,6 @@ RUN set -xe; \ pdo_sqlsrv \ redis \ sqlsrv \ - ssh2 \ ;\ # Cleanup docker-php-source delete; \ diff --git a/7.2/Dockerfile b/7.2/Dockerfile index 33ebd18c..f2f53672 100644 --- a/7.2/Dockerfile +++ b/7.2/Dockerfile @@ -161,6 +161,9 @@ RUN set -xe; \ libzip4 \ msodbcsql17 \ ;\ + # SSH2 must be installed from source for PHP 7.x + git clone https://github.com/php/pecl-networking-ssh2.git /usr/src/php/ext/ssh2 && rm -rf /usr/src/php/ext/ssh2/.git; \ + \ docker-php-ext-configure >/dev/null gd \ --with-freetype-dir=/usr/include/ \ --with-jpeg-dir=/usr/include/ \ @@ -192,6 +195,7 @@ RUN set -xe; \ pgsql \ soap \ sockets \ + ssh2 \ xsl \ zip \ ;\ @@ -205,7 +209,6 @@ RUN set -xe; \ pdo_sqlsrv \ redis \ sqlsrv \ - ssh2-1.1.2 \ xdebug \ ;\ docker-php-ext-enable \ @@ -216,7 +219,6 @@ RUN set -xe; \ pdo_sqlsrv \ redis \ sqlsrv \ - ssh2 \ ;\ # Cleanup docker-php-source delete; \ diff --git a/7.3/Dockerfile b/7.3/Dockerfile index e8e805ce..97bd6fb8 100644 --- a/7.3/Dockerfile +++ b/7.3/Dockerfile @@ -160,6 +160,9 @@ RUN set -xe; \ libzip4 \ msodbcsql17 \ ;\ + # SSH2 must be installed from source for PHP 7.x + git clone https://github.com/php/pecl-networking-ssh2.git /usr/src/php/ext/ssh2 && rm -rf /usr/src/php/ext/ssh2/.git; \ + \ docker-php-ext-configure >/dev/null gd \ --with-freetype-dir=/usr/include/ \ --with-jpeg-dir=/usr/include/ \ @@ -191,6 +194,7 @@ RUN set -xe; \ pgsql \ soap \ sockets \ + ssh2 \ xsl \ zip \ ;\ @@ -204,7 +208,6 @@ RUN set -xe; \ #pdo_sqlsrv - currently not supported in PHP 7.3 redis \ #sqlsrv - currently not supported in PHP 7.3 - ssh2-1.1.2 \ # There is currently no stable pecl release of xdebug for PHP 7.3 xdebug-2.7.0beta1 \ ;\ @@ -216,7 +219,6 @@ RUN set -xe; \ #pdo_sqlsrv - currently not supported in PHP 7.3 redis \ #sqlsrv - currently not supported in PHP 7.3 - ssh2 \ ;\ # Cleanup docker-php-source delete; \