Skip to content

Commit

Permalink
Arrange (#2499)
Browse files Browse the repository at this point in the history
* unify php verson variable
* CASSANDRA move together
* unify all php base container
  • Loading branch information
bestlong committed Feb 11, 2020
1 parent 29def5f commit b2ae5f6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ services:
context: ./laravel-horizon
args:
- CHANGE_SOURCE=${CHANGE_SOURCE}
- PHP_VERSION=${PHP_VERSION}
- LARADOCK_PHP_VERSION=${PHP_VERSION}
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
Expand Down
18 changes: 10 additions & 8 deletions laravel-horizon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
#--------------------------------------------------------------------------
#

ARG PHP_VERSION=${PHP_VERSION}
FROM php:${PHP_VERSION}-alpine
ARG LARADOCK_PHP_VERSION
FROM php:${LARADOCK_PHP_VERSION}-alpine

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.

ARG CHANGE_SOURCE=false
Expand Down Expand Up @@ -63,12 +65,6 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \
&& docker-php-ext-install pdo_pgsql \
;fi

# Install Cassandra drivers:
ARG INSTALL_CASSANDRA=false
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
apk --update add cassandra-cpp-driver \
;fi

# Install PhpRedis package:
ARG INSTALL_PHPREDIS=false
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
Expand All @@ -84,6 +80,12 @@ RUN if [ ${INSTALL_FFMPEG} = true ]; then \
apk add ffmpeg \
;fi

# Install Cassandra drivers:
ARG INSTALL_CASSANDRA=false
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
apk --update add cassandra-cpp-driver \
;fi

WORKDIR /usr/src
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
git clone https://github.com/datastax/php-driver.git \
Expand Down
9 changes: 1 addition & 8 deletions php-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#

ARG LARADOCK_PHP_VERSION

FROM laradock/php-fpm:2.7-${LARADOCK_PHP_VERSION}

LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
Expand Down Expand Up @@ -194,7 +193,6 @@ RUN if [ ${INSTALL_PCOV} = true ]; then \
;fi \
;fi


###########################################################################
# Phpdbg:
###########################################################################
Expand Down Expand Up @@ -330,7 +328,7 @@ ARG INSTALL_AMQP=false
RUN if [ ${INSTALL_AMQP} = true ]; then \
# download and install manually, to make sure it's compatible with ampq installed by pecl later
# 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 && \
mkdir -p rabbitmq-c && \
tar -C rabbitmq-c -zxvf /tmp/rabbitmq-c.tar.gz --strip 1 && \
Expand All @@ -352,7 +350,6 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \
ARG INSTALL_GEARMAN=false

RUN if [ ${INSTALL_GEARMAN} = true ]; then \
apt-get update && \
apt-get -y install libgearman-dev && \
cd /tmp && \
curl -L https://github.com/wcgallego/pecl-gearman/archive/gearman-2.0.5.zip -O && \
Expand Down Expand Up @@ -799,7 +796,6 @@ USER root
ARG INSTALL_MYSQL_CLIENT=false

RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
apt-get update -yqq && \
if [ ${LARADOCK_PHP_VERSION} = "7.3" ]; then \
apt-get -y install default-mysql-client \
;else \
Expand All @@ -816,7 +812,6 @@ USER root
ARG INSTALL_PING=false

RUN if [ ${INSTALL_PING} = true ]; then \
apt-get update -yqq && \
apt-get -y install inetutils-ping \
;fi

Expand All @@ -829,7 +824,6 @@ USER root
ARG INSTALL_SSHPASS=false

RUN if [ ${INSTALL_SSHPASS} = true ]; then \
apt-get update -yqq && \
apt-get -y install sshpass \
;fi

Expand All @@ -842,7 +836,6 @@ USER root
ARG INSTALL_FFMPEG=false

RUN if [ ${INSTALL_FFMPEG} = true ]; then \
apt-get update -yqq && \
apt-get -y install ffmpeg \
;fi

Expand Down
1 change: 0 additions & 1 deletion workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#

ARG LARADOCK_PHP_VERSION

FROM laradock/workspace:2.6.1-${LARADOCK_PHP_VERSION}

LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
Expand Down

0 comments on commit b2ae5f6

Please sign in to comment.