Skip to content

Commit 0a253a3

Browse files
authored
Alpine commands used
1 parent 72d11e4 commit 0a253a3

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

laravel-horizon/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,21 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
106106
;fi
107107

108108
###########################################################################
109-
# YAML: extension
109+
# YAML: extension
110110
###########################################################################
111111

112112
ARG INSTALL_YAML=false
113-
113+
114114
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 \
115+
apk --update add -U --no-cache --virtual temp yaml-dev \
116+
&& apk add --no-cache yaml \
117+
&& docker-php-source extract \
118+
&& pecl channel-update pecl.php.net \
119+
&& pecl install yaml \
120+
&& docker-php-ext-enable yaml \
121+
&& pecl clear-cache \
122+
&& docker-php-source delete \
123+
&& apk del temp \
123124
;fi
124125

125126

0 commit comments

Comments
 (0)