* unify php verson variable
* CASSANDRA move together
* unify all php base container
This commit is contained in:
Shao Yu-Lung (Allen) 2020-02-11 18:41:19 +08:00 committed by GitHub
parent 29def5f0b4
commit b2ae5f6d44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 18 deletions

View File

@ -282,7 +282,7 @@ services:
context: ./laravel-horizon context: ./laravel-horizon
args: args:
- CHANGE_SOURCE=${CHANGE_SOURCE} - CHANGE_SOURCE=${CHANGE_SOURCE}
- PHP_VERSION=${PHP_VERSION} - LARADOCK_PHP_VERSION=${PHP_VERSION}
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL} - INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}

View File

@ -4,11 +4,13 @@
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# #
ARG PHP_VERSION=${PHP_VERSION} ARG LARADOCK_PHP_VERSION
FROM php:${PHP_VERSION}-alpine FROM php:${LARADOCK_PHP_VERSION}-alpine
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>" LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
ARG LARADOCK_PHP_VERSION
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env. # If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
ARG CHANGE_SOURCE=false ARG CHANGE_SOURCE=false
@ -63,12 +65,6 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \
&& docker-php-ext-install pdo_pgsql \ && docker-php-ext-install pdo_pgsql \
;fi ;fi
# Install Cassandra drivers:
ARG INSTALL_CASSANDRA=false
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
apk --update add cassandra-cpp-driver \
;fi
# Install PhpRedis package: # Install PhpRedis package:
ARG INSTALL_PHPREDIS=false ARG INSTALL_PHPREDIS=false
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
@ -84,6 +80,12 @@ RUN if [ ${INSTALL_FFMPEG} = true ]; then \
apk add ffmpeg \ apk add ffmpeg \
;fi ;fi
# Install Cassandra drivers:
ARG INSTALL_CASSANDRA=false
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
apk --update add cassandra-cpp-driver \
;fi
WORKDIR /usr/src WORKDIR /usr/src
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \ RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
git clone https://github.com/datastax/php-driver.git \ git clone https://github.com/datastax/php-driver.git \

View File

@ -13,7 +13,6 @@
# #
ARG LARADOCK_PHP_VERSION ARG LARADOCK_PHP_VERSION
FROM laradock/php-fpm:2.7-${LARADOCK_PHP_VERSION} FROM laradock/php-fpm:2.7-${LARADOCK_PHP_VERSION}
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>" LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
@ -194,7 +193,6 @@ RUN if [ ${INSTALL_PCOV} = true ]; then \
;fi \ ;fi \
;fi ;fi
########################################################################### ###########################################################################
# Phpdbg: # Phpdbg:
########################################################################### ###########################################################################
@ -330,7 +328,7 @@ ARG INSTALL_AMQP=false
RUN if [ ${INSTALL_AMQP} = true ]; then \ RUN if [ ${INSTALL_AMQP} = true ]; then \
# download and install manually, to make sure it's compatible with ampq installed by pecl later # download and install manually, to make sure it's compatible with ampq installed by pecl later
# install cmake first # install cmake first
apt-get update && apt-get -y install cmake && \ apt-get -y install cmake && \
curl -L -o /tmp/rabbitmq-c.tar.gz https://github.com/alanxz/rabbitmq-c/archive/master.tar.gz && \ curl -L -o /tmp/rabbitmq-c.tar.gz https://github.com/alanxz/rabbitmq-c/archive/master.tar.gz && \
mkdir -p rabbitmq-c && \ mkdir -p rabbitmq-c && \
tar -C rabbitmq-c -zxvf /tmp/rabbitmq-c.tar.gz --strip 1 && \ tar -C rabbitmq-c -zxvf /tmp/rabbitmq-c.tar.gz --strip 1 && \
@ -352,7 +350,6 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \
ARG INSTALL_GEARMAN=false ARG INSTALL_GEARMAN=false
RUN if [ ${INSTALL_GEARMAN} = true ]; then \ RUN if [ ${INSTALL_GEARMAN} = true ]; then \
apt-get update && \
apt-get -y install libgearman-dev && \ apt-get -y install libgearman-dev && \
cd /tmp && \ cd /tmp && \
curl -L https://github.com/wcgallego/pecl-gearman/archive/gearman-2.0.5.zip -O && \ curl -L https://github.com/wcgallego/pecl-gearman/archive/gearman-2.0.5.zip -O && \
@ -799,7 +796,6 @@ USER root
ARG INSTALL_MYSQL_CLIENT=false ARG INSTALL_MYSQL_CLIENT=false
RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \ RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
apt-get update -yqq && \
if [ ${LARADOCK_PHP_VERSION} = "7.3" ]; then \ if [ ${LARADOCK_PHP_VERSION} = "7.3" ]; then \
apt-get -y install default-mysql-client \ apt-get -y install default-mysql-client \
;else \ ;else \
@ -816,7 +812,6 @@ USER root
ARG INSTALL_PING=false ARG INSTALL_PING=false
RUN if [ ${INSTALL_PING} = true ]; then \ RUN if [ ${INSTALL_PING} = true ]; then \
apt-get update -yqq && \
apt-get -y install inetutils-ping \ apt-get -y install inetutils-ping \
;fi ;fi
@ -829,7 +824,6 @@ USER root
ARG INSTALL_SSHPASS=false ARG INSTALL_SSHPASS=false
RUN if [ ${INSTALL_SSHPASS} = true ]; then \ RUN if [ ${INSTALL_SSHPASS} = true ]; then \
apt-get update -yqq && \
apt-get -y install sshpass \ apt-get -y install sshpass \
;fi ;fi
@ -842,7 +836,6 @@ USER root
ARG INSTALL_FFMPEG=false ARG INSTALL_FFMPEG=false
RUN if [ ${INSTALL_FFMPEG} = true ]; then \ RUN if [ ${INSTALL_FFMPEG} = true ]; then \
apt-get update -yqq && \
apt-get -y install ffmpeg \ apt-get -y install ffmpeg \
;fi ;fi

View File

@ -13,7 +13,6 @@
# #
ARG LARADOCK_PHP_VERSION ARG LARADOCK_PHP_VERSION
FROM laradock/workspace:2.6.1-${LARADOCK_PHP_VERSION} FROM laradock/workspace:2.6.1-${LARADOCK_PHP_VERSION}
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>" LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"