Unverified Commit ca376935 authored by Yu-Lung Shao (Allen)'s avatar Yu-Lung Shao (Allen) Committed by GitHub

Merge pull request #1382 from desaroger/php-72-pr

Add PHP 7.2 support and fix issues on 5.6-7.0-7.1 versions
parents 13f55ef7 227bc373
......@@ -10,16 +10,19 @@ env:
- PHP_VERSION=56 BUILD_SERVICE=workspace
- PHP_VERSION=70 BUILD_SERVICE=workspace
- PHP_VERSION=71 BUILD_SERVICE=workspace
- PHP_VERSION=72 BUILD_SERVICE=workspace
- PHP_VERSION=56 BUILD_SERVICE=php-fpm
- PHP_VERSION=70 BUILD_SERVICE=php-fpm
- PHP_VERSION=71 BUILD_SERVICE=php-fpm
- PHP_VERSION=72 BUILD_SERVICE=php-fpm
- PHP_VERSION=hhvm BUILD_SERVICE=hhvm
# - PHP_VERSION=56 BUILD_SERVICE=php-worker
- PHP_VERSION=70 BUILD_SERVICE=php-worker
- PHP_VERSION=71 BUILD_SERVICE=php-worker
- PHP_VERSION=72 BUILD_SERVICE=php-worker
- PHP_VERSION=56 BUILD_SERVICE=mssql
- PHP_VERSION=70 BUILD_SERVICE=mssql
......
......@@ -8,9 +8,9 @@
APPLICATION=../
### PHP Version ########################################################################################################
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 71 - 70 - 56
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 72 - 71 - 70 - 56
PHP_VERSION=71
PHP_VERSION=72
### PHP Interpreter ####################################################################################################
# Select the PHP Interpreter. Accepted values: hhvm - php-fpm
......
......@@ -177,7 +177,8 @@ ARG INSTALL_GMP=false
RUN if [ ${INSTALL_GMP} = true ]; then \
# Install the GMP extension
apt-get update -yqq && \
apt-get install -y libgmp-dev && \
apt-get install -y libgmp-dev && \
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h && \
docker-php-ext-install gmp \
;fi
......@@ -324,11 +325,17 @@ ARG INSTALL_IMAGEMAGICK=false
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apt-get update -y && \
apt-get install -y libmagickwand-dev imagemagick && \
apt-get install -y libmagickwand-dev imagemagick && \
pecl install imagick && \
docker-php-ext-enable imagick \
;fi
#####################################
# Check PHP version:
#####################################
RUN php -v | head -n 1 | grep -q "PHP 5.6."
#
#--------------------------------------------------------------------------
# Final Touch
......
......@@ -351,6 +351,12 @@ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
docker-php-ext-enable imagick \
;fi
#####################################
# Check PHP version:
#####################################
RUN php -v | head -n 1 | grep -q "PHP 7.0."
#
#--------------------------------------------------------------------------
# Final Touch
......
......@@ -357,6 +357,12 @@ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
docker-php-ext-enable imagick \
;fi
#####################################
# Check PHP version:
#####################################
RUN php -v | head -n 1 | grep -q "PHP 7.1."
#
#--------------------------------------------------------------------------
# Final Touch
......
This diff is collapsed.
This diff is collapsed.
......@@ -56,6 +56,13 @@ ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
#
# -- Your awesome modifications go here -- #
#
#--------------------------------------------------------------------------
# Check PHP version
#--------------------------------------------------------------------------
#
RUN php -v | head -n 1 | grep -q "PHP 7.0."
#
#--------------------------------------------------------------------------
......
......@@ -56,6 +56,13 @@ ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
#
# -- Your awesome modifications go here -- #
#
#--------------------------------------------------------------------------
# Check PHP version
#--------------------------------------------------------------------------
#
RUN php -v | head -n 1 | grep -q "PHP 7.1."
#
#--------------------------------------------------------------------------
......
#
#--------------------------------------------------------------------------
# Image Setup
#--------------------------------------------------------------------------
#
FROM php:7.2-alpine
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
RUN apk --update add wget \
curl \
git \
build-base \
libmemcached-dev \
libmcrypt-dev \
libxml2-dev \
zlib-dev \
autoconf \
cyrus-sasl-dev \
libgsasl-dev \
supervisor
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml
RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached
# Install PostgreSQL drivers:
ARG INSTALL_PGSQL=false
RUN if [ ${INSTALL_PGSQL} = true ]; then \
apk --update add postgresql-dev \
&& docker-php-ext-install pdo_pgsql \
;fi
RUN rm /var/cache/apk/* \
&& mkdir -p /var/www
#
#--------------------------------------------------------------------------
# Optional Supervisord Configuration
#--------------------------------------------------------------------------
#
# Modify the ./supervisor.conf file to match your App's requirements.
# Make sure you rebuild your container with every change.
#
COPY supervisord.conf /etc/supervisord.conf
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
#
#--------------------------------------------------------------------------
# Optional Software's Installation
#--------------------------------------------------------------------------
#
# If you need to modify this image, feel free to do it right here.
#
# -- Your awesome modifications go here -- #
#
#--------------------------------------------------------------------------
# Check PHP version
#--------------------------------------------------------------------------
#
RUN php -v | head -n 1 | grep -q "PHP 7.2."
#
#--------------------------------------------------------------------------
# Final Touch
#--------------------------------------------------------------------------
#
WORKDIR /etc/supervisor/conf.d/
......@@ -270,7 +270,7 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
pecl -q install swoole-2.0.11 && \
pecl -q install -f swoole-1.10.1 && \
echo "extension=swoole.so" >> /etc/php/5.6/mods-available/swoole.ini && \
ln -s /etc/php/5.6/mods-available/swoole.ini /etc/php/5.6/cli/conf.d/20-swoole.ini \
;fi
......@@ -649,6 +649,12 @@ RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
&& rm chromedriver_linux64.zip \
;fi
#####################################
# Check PHP version:
#####################################
RUN php -v | head -n 1 | grep -q "PHP 5.6."
#
#--------------------------------------------------------------------------
# Final Touch
......
......@@ -726,6 +726,12 @@ RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
&& rm chromedriver_linux64.zip \
;fi
#####################################
# Check PHP version:
#####################################
RUN php -v | head -n 1 | grep -q "PHP 7.0."
#
#--------------------------------------------------------------------------
# Final Touch
......
......@@ -424,7 +424,7 @@ RUN if [ ${INSTALL_V8JS} = true ]; then \
# Install the php V8JS extension
add-apt-repository -y ppa:pinepain/libv8-5.4 \
&& apt-get update -yqq \
&& apt-get install -y php-xml php-dev php-pear libv8-5.4 \
&& apt-get install -y php7.1-xml php7.1-dev php-pear libv8-5.4 \
&& pecl install v8js \
&& echo "extension=v8js.so" >> /etc/php/7.1/cli/php.ini \
;fi
......@@ -442,6 +442,11 @@ RUN echo "" >> ~/.bashrc && \
#####################################
# Laravel Envoy:
#####################################
USER root
RUN apt-get update -yqq \
&& apt-get install -y php-curl
USER laradock
ARG INSTALL_LARAVEL_ENVOY=false
......@@ -479,14 +484,18 @@ USER laradock
#####################################
# Deployer:
#####################################
USER laradock
USER root
ARG INSTALL_DEPLOYER=false
ENV INSTALL_DEPLOYER ${INSTALL_DEPLOYER}
RUN if [ ${INSTALL_DEPLOYER} = true ]; then \
# Install the Deployer
composer global require "deployer/deployer" \
# Using Phar as currently there is no support for laravel 4 from composer version
# Waiting to be resolved on https://github.com/deployphp/deployer/issues/1552
curl -LO https://deployer.org/deployer.phar && \
mv deployer.phar /usr/local/bin/dep && \
chmod +x /usr/local/bin/dep \
;fi
#####################################
......@@ -726,6 +735,12 @@ RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
&& rm chromedriver_linux64.zip \
;fi
#####################################
# Check PHP version:
#####################################
RUN php -v | head -n 1 | grep -q "PHP 7.1."
#
#--------------------------------------------------------------------------
# Final Touch
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment