Merge branch 'master' into gearman

This commit is contained in:
Shao Yu-Lung (Allen)
2019-10-07 10:47:37 +08:00
committed by GitHub
14 changed files with 531 additions and 219 deletions

View File

@ -23,6 +23,12 @@ ARG LARADOCK_PHP_VERSION
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
ARG CHANGE_SOURCE=false
RUN if [ ${CHANGE_SOURCE} = true ]; then \
# Change application source from deb.debian.org to aliyun source
sed -i 's/deb.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list \
;fi
# always run apt update when start and after add new source list, then clean up at end.
RUN set -xe; \
apt-get update -yqq && \
@ -196,9 +202,13 @@ ARG INSTALL_PHPREDIS=false
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
# Install Php Redis Extension
printf "\n" | pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install -o -f redis-4.3.0; \
else \
pecl install -o -f redis; \
fi \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
;fi
###########################################################################