Merge pull request #22 from Chialab/issue/18-php-7.2

PHP 7.2
This commit is contained in:
Paolo Cuffiani
2017-12-04 17:19:09 +01:00
committed by GitHub
10 changed files with 135 additions and 15 deletions
+3
View File
@@ -22,6 +22,9 @@ env:
- VERSION=7.1
- VERSION=7.1-apache
- VERSION=7.1-fpm
- VERSION=7.2 NO_DEV=1
- VERSION=7.2-apache NO_DEV=1
- VERSION=7.2-fpm NO_DEV=1
install:
- travis_wait 30 make build VERSION=${VERSION}
+37
View File
@@ -0,0 +1,37 @@
FROM php:7.2
MAINTAINER dev@chialab.it
# Install PHP extensions and PECL modules.
RUN buildDeps=" \
default-libmysqlclient-dev \
libbz2-dev \
libmemcached-dev \
libsasl2-dev \
" \
runtimeDeps=" \
curl \
git \
libfreetype6-dev \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libmemcachedutil2 \
libpng-dev \
libpq-dev \
libxml2-dev \
" \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y $buildDeps $runtimeDeps \
&& docker-php-ext-install bcmath bz2 calendar iconv intl mbstring mysqli opcache pdo_mysql pdo_pgsql pgsql soap zip \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install ldap \
&& pecl install memcached redis \
&& docker-php-ext-enable memcached.so redis.so \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -r /var/lib/apt/lists/*
# Install Composer.
ENV COMPOSER_HOME /root/composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
ENV PATH $COMPOSER_HOME/vendor/bin:$PATH
+38
View File
@@ -0,0 +1,38 @@
FROM php:7.2-apache
MAINTAINER dev@chialab.it
# Install PHP extensions and PECL modules.
RUN buildDeps=" \
default-libmysqlclient-dev \
libbz2-dev \
libmemcached-dev \
libsasl2-dev \
" \
runtimeDeps=" \
curl \
git \
libfreetype6-dev \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libmemcachedutil2 \
libpng-dev \
libpq-dev \
libxml2-dev \
" \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y $buildDeps $runtimeDeps \
&& docker-php-ext-install bcmath bz2 calendar iconv intl mbstring mysqli opcache pdo_mysql pdo_pgsql pgsql soap zip \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install ldap \
&& pecl install memcached redis \
&& docker-php-ext-enable memcached.so redis.so \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -r /var/lib/apt/lists/* \
&& a2enmod rewrite
# Install Composer.
ENV COMPOSER_HOME /root/composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
ENV PATH $COMPOSER_HOME/vendor/bin:$PATH
+37
View File
@@ -0,0 +1,37 @@
FROM php:7.2-fpm
MAINTAINER dev@chialab.it
# Install PHP extensions and PECL modules.
RUN buildDeps=" \
default-libmysqlclient-dev \
libbz2-dev \
libmemcached-dev \
libsasl2-dev \
" \
runtimeDeps=" \
curl \
git \
libfreetype6-dev \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libmemcachedutil2 \
libpng-dev \
libpq-dev \
libxml2-dev \
" \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y $buildDeps $runtimeDeps \
&& docker-php-ext-install bcmath bz2 calendar iconv intl mbstring mysqli opcache pdo_mysql pdo_pgsql pgsql soap zip \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install ldap \
&& pecl install memcached redis \
&& docker-php-ext-enable memcached.so redis.so \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -r /var/lib/apt/lists/*
# Install Composer.
ENV COMPOSER_HOME /root/composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
ENV PATH $COMPOSER_HOME/vendor/bin:$PATH
+3 -4
View File
@@ -3,9 +3,9 @@ MAINTAINER dev@chialab.it
# Install PHP extensions and PECL modules.
RUN buildDeps=" \
default-libmysqlclient-dev \
libbz2-dev \
libmemcached-dev \
libmysqlclient-dev \
libsasl2-dev \
" \
runtimeDeps=" \
@@ -15,14 +15,13 @@ RUN buildDeps=" \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libmcrypt-dev \
libmemcachedutil2 \
libpng12-dev \
libpng-dev \
libpq-dev \
libxml2-dev \
" \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y $buildDeps $runtimeDeps \
&& docker-php-ext-install bcmath bz2 calendar iconv intl mbstring mcrypt mysqli opcache pdo_mysql pdo_pgsql pgsql soap zip \
&& docker-php-ext-install bcmath bz2 calendar iconv intl mbstring mysqli opcache pdo_mysql pdo_pgsql pgsql soap zip \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
+8 -5
View File
@@ -4,6 +4,7 @@ SHELL := /bin/bash
PARENT_IMAGE := php
IMAGE := chialab/php
VERSION ?= latest
PHP_VERSION = $(firstword $(subst -, ,$(VERSION)))
# Extensions.
EXTENSIONS := \
@@ -15,7 +16,6 @@ EXTENSIONS := \
gd \
ldap \
mbstring \
mcrypt \
memcached \
mysqli \
pdo_mysql \
@@ -24,13 +24,16 @@ EXTENSIONS := \
redis \
soap \
zip
ifneq ($(VERSION),$(filter 7.0 7.1 latest, $(VERSION)))
ifeq (,$(findstring $(PHP_VERSION), 7.2 latest))
# Add more extensions to PHP < 7.2.
EXTENSIONS += mcrypt
endif
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 latest))
# Add more extensions to 5.x series images.
EXTENSIONS += mysql
endif
# add opcache check to php version with zend opcache
ifeq ($(VERSION),$(filter 5.5 5.6 7.0 7.1 latest, $(VERSION)))
ifneq (,$(findstring $(PHP_VERSION), 5.5 5.6 7.0 7.1 7.2 latest))
# Add OPCache check to PHP version with Zend OPCache.
EXTENSIONS += OPcache
endif
+3
View File
@@ -25,6 +25,9 @@ For development environments, you might want to choose an [image with XDebug ins
- [`7.1` (_7.1/Dockerfile_)](https://github.com/Chialab/docker-php/blob/master/7.1/Dockerfile)
- [`7.1-apache` (_7.1/apache/Dockerfile_)](https://github.com/Chialab/docker-php/blob/master/7.1/apache/Dockerfile)
- [`7.1-fpm` (_7.1/fpm/Dockerfile_)](https://github.com/Chialab/docker-php/blob/master/7.1/fpm/Dockerfile)
- [`7.2` (_7.2/Dockerfile_)](https://github.com/Chialab/docker-php/blob/master/7.2/Dockerfile)
- [`7.2-apache` (_7.2/apache/Dockerfile_)](https://github.com/Chialab/docker-php/blob/master/7.2/apache/Dockerfile)
- [`7.2-fpm` (_7.2/fpm/Dockerfile_)](https://github.com/Chialab/docker-php/blob/master/7.2/fpm/Dockerfile)
As you might have guessed, all tags are built on top of the corresponding tag of the official image. Not all tags are supported in order to easen manteinance.
+1 -1
View File
@@ -1,4 +1,4 @@
FROM chialab/php:latest
FROM chialab/php:7.1
MAINTAINER dev@chialab.it
# Install XDebug.
+4 -5
View File
@@ -4,6 +4,7 @@ SHELL := /bin/bash
PARENT_IMAGE := chialab/php
IMAGE := chialab/php-dev
VERSION ?= latest
PHP_VERSION = $(firstword $(subst -, ,$(VERSION)))
# Extensions.
EXTENSIONS := \
@@ -15,7 +16,6 @@ EXTENSIONS := \
gd \
ldap \
mbstring \
mcrypt \
memcached \
mysqli \
pdo_mysql \
@@ -25,13 +25,12 @@ EXTENSIONS := \
soap \
Xdebug \
zip
ifneq ($(VERSION),$(filter 7.0 7.1 latest, $(VERSION)))
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 latest))
# Add more extensions to 5.x series images.
EXTENSIONS += mysql
endif
# add opcache check to php version with zend opcache
ifeq ($(VERSION),$(filter 5.5 5.6 7.0 7.1 latest, $(VERSION)))
ifneq (,$(findstring $(PHP_VERSION), 5.5 5.6 7.0 7.1 7.2 latest))
# Add OPCache check to PHP version with Zend OPCache.
EXTENSIONS += OPcache
endif
+1
View File
@@ -10,6 +10,7 @@ For more production-like environments, you might want to choose an [image *witho
## Available tags and `Dockerfile` links
- [`latest` (_dev/Dockerfile_)](https://github.com/Chialab/docker-php/blob/master/dev/Dockerfile)
(**NOTE**: this is actually built on top of PHP 7.1 as XDebug is not yet available for PHP 7.2!)
- [`5.5` (_dev/5.5/Dockerfile_)](https://github.com/Chialab/docker-php/blob/master/dev/5.5/Dockerfile)
- [`5.5-apache` (_dev/5.5/apache/Dockerfile_)](https://github.com/Chialab/docker-php/blob/master/dev/5.5/apache/Dockerfile)
- [`5.5-fpm` (_dev/5.5/fpm/Dockerfile_)](https://github.com/Chialab/docker-php/blob/master/dev/5.5/fpm/Dockerfile)