Skip to content

Commit 82a4b1d

Browse files
authored
Add code to install YAML extension
1 parent c9e71c6 commit 82a4b1d

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

laravel-horizon/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,23 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
105105
&& docker-php-ext-enable mongodb \
106106
;fi
107107

108+
###########################################################################
109+
# YAML: extension
110+
###########################################################################
111+
112+
ARG INSTALL_YAML=false
113+
114+
RUN if [ ${INSTALL_YAML} = true ]; then \
115+
apt-get install libyaml-dev -y ; \
116+
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
117+
pecl install -a yaml-1.3.2; \
118+
else \
119+
pecl install yaml; \
120+
fi && \
121+
echo "extension=yaml.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini && \
122+
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/35-yaml.ini \
123+
;fi
124+
108125

109126
###########################################################################
110127
# PHP Memcached:

0 commit comments

Comments
 (0)