From 0a253a3d7e464c967c4b9cb179a4571ef07a2ebc Mon Sep 17 00:00:00 2001 From: Valentino Lauciani Date: Tue, 4 Feb 2020 20:33:41 +0100 Subject: [PATCH] Alpine commands used --- laravel-horizon/Dockerfile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index 07a8f8d..49d0495 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -106,20 +106,21 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ;fi ########################################################################### -# YAML: extension +# YAML: extension ########################################################################### 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 \ + apk --update add -U --no-cache --virtual temp yaml-dev \ + && apk add --no-cache yaml \ + && docker-php-source extract \ + && pecl channel-update pecl.php.net \ + && pecl install yaml \ + && docker-php-ext-enable yaml \ + && pecl clear-cache \ + && docker-php-source delete \ + && apk del temp \ ;fi