From 4270f1db71379b7775575dbb3b1fb0e3699b2274 Mon Sep 17 00:00:00 2001 From: Pavel Savushkin Date: Sun, 21 Mar 2021 18:10:08 +0200 Subject: [PATCH 1/5] fix(YAML extension): get built YAML extension for all versions in all services We need to build yaml extension for `workspace`, `php-fpm` and `laravel-horizon` images. Turn on YAML for GitHub Actions. --- .github/workflows/main-ci.yml | 3 +-- php-fpm/Dockerfile | 12 +++++++----- workspace/Dockerfile | 16 ++++++++-------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index d1ea0b71..3ab1f21c 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -1,6 +1,6 @@ name: CI -on: +on: push: branches: '**' tags: '**' @@ -32,7 +32,6 @@ jobs: sed -i -- 's/PHALCON=true/PHALCON=false/g' .env sed -i -- 's/RDKAFKA=true/RDKAFKA=false/g' .env sed -i -- 's/MAILPARSE=true/MAILPARSE=false/g' .env - sed -i -- 's/YAML=true/YAML=false/g' .env sed -i -- 's/MSSQL=true/MSSQL=false/g' .env sed -i -- 's/AMQP=true/AMQP=false/g' .env sed -i -- 's/MEMCACHED=true/MEMCACHED=false/g' .env diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 06fbcdf6..88784a92 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -840,11 +840,13 @@ ARG INSTALL_YAML=false RUN if [ ${INSTALL_YAML} = true ]; then \ apt-get install libyaml-dev -y ; \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - pecl install -a yaml-1.3.2; \ - else \ - pecl install yaml; \ - fi && \ - docker-php-ext-enable yaml \ + echo '' | pecl install -a yaml-1.3.2; \ + elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \ + echo '' | pecl install yaml-2.0.4; \ + else + echo '' | pecl install yaml; \ + fi \ + && docker-php-ext-enable yaml; \ ;fi ########################################################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 534e4c7a..4cbcf78f 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1388,12 +1388,14 @@ ARG INSTALL_YAML=false RUN if [ ${INSTALL_YAML} = true ]; then \ apt-get install libyaml-dev -y ; \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - pecl install -a yaml-1.3.2; \ - else \ - pecl install yaml; \ - fi && \ - echo "extension=yaml.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini && \ - ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/35-yaml.ini \ + echo '' | pecl install -a yaml-1.3.2; \ + elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \ + echo '' | pecl install yaml-2.0.4; \ + else + echo '' | pecl install yaml; \ + fi \ + && echo "extension=yaml.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini \ + && ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/35-yaml.ini; \ ;fi ########################################################################### @@ -1632,8 +1634,6 @@ RUN if [ ${SHELL_OH_MY_ZSH} = true ]; then \ echo "" >> ~/.zshrc \ ;fi -USER root - # #-------------------------------------------------------------------------- # Final Touch From 95fe1b179f4f60ce2a1d050621c3fe7d8e689974 Mon Sep 17 00:00:00 2001 From: Pavel Savushkin Date: Sun, 21 Mar 2021 18:41:48 +0200 Subject: [PATCH 2/5] fix(YAML extension): avoid typo --- workspace/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 4cbcf78f..47bd4adb 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1395,7 +1395,7 @@ RUN if [ ${INSTALL_YAML} = true ]; then \ echo '' | pecl install yaml; \ fi \ && echo "extension=yaml.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini \ - && ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/35-yaml.ini; \ + && ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/35-yaml.ini \ ;fi ########################################################################### From 9317b71ebcb07b034dc6c8e9f775e800c2297344 Mon Sep 17 00:00:00 2001 From: Pavel Savushkin Date: Sun, 21 Mar 2021 18:46:47 +0200 Subject: [PATCH 3/5] fix(YAML extension): avoid typo --- php-fpm/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 88784a92..27a839e0 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -843,7 +843,7 @@ RUN if [ ${INSTALL_YAML} = true ]; then \ echo '' | pecl install -a yaml-1.3.2; \ elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \ echo '' | pecl install yaml-2.0.4; \ - else + else \ echo '' | pecl install yaml; \ fi \ && docker-php-ext-enable yaml; \ From ad2b94fa60bff9271592f33152610d84d5b3db95 Mon Sep 17 00:00:00 2001 From: Pavel Savushkin Date: Sun, 21 Mar 2021 18:51:06 +0200 Subject: [PATCH 4/5] fix(YAML extension): avoid typo --- workspace/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 47bd4adb..578a795b 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1391,7 +1391,7 @@ RUN if [ ${INSTALL_YAML} = true ]; then \ echo '' | pecl install -a yaml-1.3.2; \ elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \ echo '' | pecl install yaml-2.0.4; \ - else + else \ echo '' | pecl install yaml; \ fi \ && echo "extension=yaml.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini \ From 5686c698e7afae651d1e0efddbdc3779ed3374eb Mon Sep 17 00:00:00 2001 From: Pavel Savushkin Date: Sun, 21 Mar 2021 19:21:34 +0200 Subject: [PATCH 5/5] fix(YAML extension): avoid typo --- php-fpm/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 27a839e0..980ad426 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -838,15 +838,15 @@ USER root ARG INSTALL_YAML=false RUN if [ ${INSTALL_YAML} = true ]; then \ - apt-get install libyaml-dev -y ; \ - if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + apt-get install -yqq libyaml-dev \ + && if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ echo '' | pecl install -a yaml-1.3.2; \ elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \ echo '' | pecl install yaml-2.0.4; \ else \ echo '' | pecl install yaml; \ fi \ - && docker-php-ext-enable yaml; \ + && docker-php-ext-enable yaml \ ;fi ###########################################################################