mirror of
https://github.com/chialab/docker-php.git
synced 2026-08-24 10:13:24 -05:00
feat: added PHP 8
This commit is contained in:
@@ -32,6 +32,9 @@ env:
|
||||
- 'VERSION=7.4'
|
||||
- 'VERSION=7.4-apache'
|
||||
- 'VERSION=7.4-fpm'
|
||||
- 'VERSION=8.0'
|
||||
- 'VERSION=8.0-apache'
|
||||
- 'VERSION=8.0-fpm'
|
||||
|
||||
install:
|
||||
- 'travis_wait 30 make build VERSION=${VERSION}'
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
FROM php:8.0
|
||||
LABEL maintainer="dev@chialab.io"
|
||||
|
||||
# Download script to install PHP extensions and dependencies
|
||||
ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/
|
||||
|
||||
RUN chmod uga+x /usr/local/bin/install-php-extensions && sync
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
|
||||
curl \
|
||||
git \
|
||||
zip unzip \
|
||||
&& install-php-extensions \
|
||||
bcmath \
|
||||
bz2 \
|
||||
calendar \
|
||||
exif \
|
||||
gd \
|
||||
intl \
|
||||
ldap \
|
||||
memcached \
|
||||
mysqli \
|
||||
opcache \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
pgsql \
|
||||
redis \
|
||||
soap \
|
||||
xsl \
|
||||
zip \
|
||||
sockets \
|
||||
pdo_sqlsrv \
|
||||
sqlsrv
|
||||
# already installed:
|
||||
# iconv \
|
||||
# mbstring \
|
||||
|
||||
# Install Composer.
|
||||
ENV PATH=$PATH:/root/composer2/vendor/bin:/root/composer1/vendor/bin \
|
||||
COMPOSER_ALLOW_SUPERUSER=1 \
|
||||
COMPOSER_HOME=/root/composer2 \
|
||||
COMPOSER1_HOME=/root/composer1
|
||||
RUN cd /opt \
|
||||
# Download installer and check for its integrity.
|
||||
&& curl -sSL https://getcomposer.org/installer > composer-setup.php \
|
||||
&& curl -sSL https://composer.github.io/installer.sha384sum > composer-setup.sha384sum \
|
||||
&& sha384sum --check composer-setup.sha384sum \
|
||||
# Install Composer 2 and expose `composer` as a symlink to it.
|
||||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer2 --2 \
|
||||
&& ln -s /usr/local/bin/composer2 /usr/local/bin/composer \
|
||||
# Install Composer 1, make it point to a different `$COMPOSER_HOME` directory than Composer 2, install `hirak/prestissimo` plugin.
|
||||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=.composer1 --1 \
|
||||
&& printf "#!/bin/sh\nCOMPOSER_HOME=\$COMPOSER1_HOME\nexec /usr/local/bin/.composer1 \$@" > /usr/local/bin/composer1 \
|
||||
&& chmod 755 /usr/local/bin/composer1 \
|
||||
&& composer1 global require hirak/prestissimo \
|
||||
# Remove installer files.
|
||||
&& rm /opt/composer-setup.php /opt/composer-setup.sha384sum
|
||||
@@ -0,0 +1,59 @@
|
||||
FROM php:8.0-apache
|
||||
LABEL maintainer="dev@chialab.io"
|
||||
|
||||
# Download script to install PHP extensions and dependencies
|
||||
ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/
|
||||
|
||||
RUN chmod uga+x /usr/local/bin/install-php-extensions && sync
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
|
||||
curl \
|
||||
git \
|
||||
zip unzip \
|
||||
&& install-php-extensions \
|
||||
bcmath \
|
||||
bz2 \
|
||||
calendar \
|
||||
exif \
|
||||
gd \
|
||||
intl \
|
||||
ldap \
|
||||
memcached \
|
||||
mysqli \
|
||||
opcache \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
pgsql \
|
||||
redis \
|
||||
soap \
|
||||
xsl \
|
||||
zip \
|
||||
sockets \
|
||||
pdo_sqlsrv \
|
||||
sqlsrv \
|
||||
# already installed:
|
||||
# iconv \
|
||||
# mbstring \
|
||||
&& a2enmod rewrite
|
||||
|
||||
# Install Composer.
|
||||
ENV PATH=$PATH:/root/composer2/vendor/bin:/root/composer1/vendor/bin \
|
||||
COMPOSER_ALLOW_SUPERUSER=1 \
|
||||
COMPOSER_HOME=/root/composer2 \
|
||||
COMPOSER1_HOME=/root/composer1
|
||||
RUN cd /opt \
|
||||
# Download installer and check for its integrity.
|
||||
&& curl -sSL https://getcomposer.org/installer > composer-setup.php \
|
||||
&& curl -sSL https://composer.github.io/installer.sha384sum > composer-setup.sha384sum \
|
||||
&& sha384sum --check composer-setup.sha384sum \
|
||||
# Install Composer 2 and expose `composer` as a symlink to it.
|
||||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer2 --2 \
|
||||
&& ln -s /usr/local/bin/composer2 /usr/local/bin/composer \
|
||||
# Install Composer 1, make it point to a different `$COMPOSER_HOME` directory than Composer 2, install `hirak/prestissimo` plugin.
|
||||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=.composer1 --1 \
|
||||
&& printf "#!/bin/sh\nCOMPOSER_HOME=\$COMPOSER1_HOME\nexec /usr/local/bin/.composer1 \$@" > /usr/local/bin/composer1 \
|
||||
&& chmod 755 /usr/local/bin/composer1 \
|
||||
&& composer1 global require hirak/prestissimo \
|
||||
# Remove installer files.
|
||||
&& rm /opt/composer-setup.php /opt/composer-setup.sha384sum
|
||||
@@ -0,0 +1,58 @@
|
||||
FROM php:8.0-fpm
|
||||
LABEL maintainer="dev@chialab.io"
|
||||
|
||||
# Download script to install PHP extensions and dependencies
|
||||
ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/
|
||||
|
||||
RUN chmod uga+x /usr/local/bin/install-php-extensions && sync
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
|
||||
curl \
|
||||
git \
|
||||
zip unzip \
|
||||
&& install-php-extensions \
|
||||
bcmath \
|
||||
bz2 \
|
||||
calendar \
|
||||
exif \
|
||||
gd \
|
||||
intl \
|
||||
ldap \
|
||||
memcached \
|
||||
mysqli \
|
||||
opcache \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
pgsql \
|
||||
redis \
|
||||
soap \
|
||||
xsl \
|
||||
zip \
|
||||
sockets \
|
||||
pdo_sqlsrv \
|
||||
sqlsrv
|
||||
# already installed:
|
||||
# iconv \
|
||||
# mbstring \
|
||||
|
||||
# Install Composer.
|
||||
ENV PATH=$PATH:/root/composer2/vendor/bin:/root/composer1/vendor/bin \
|
||||
COMPOSER_ALLOW_SUPERUSER=1 \
|
||||
COMPOSER_HOME=/root/composer2 \
|
||||
COMPOSER1_HOME=/root/composer1
|
||||
RUN cd /opt \
|
||||
# Download installer and check for its integrity.
|
||||
&& curl -sSL https://getcomposer.org/installer > composer-setup.php \
|
||||
&& curl -sSL https://composer.github.io/installer.sha384sum > composer-setup.sha384sum \
|
||||
&& sha384sum --check composer-setup.sha384sum \
|
||||
# Install Composer 2 and expose `composer` as a symlink to it.
|
||||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer2 --2 \
|
||||
&& ln -s /usr/local/bin/composer2 /usr/local/bin/composer \
|
||||
# Install Composer 1, make it point to a different `$COMPOSER_HOME` directory than Composer 2, install `hirak/prestissimo` plugin.
|
||||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=.composer1 --1 \
|
||||
&& printf "#!/bin/sh\nCOMPOSER_HOME=\$COMPOSER1_HOME\nexec /usr/local/bin/.composer1 \$@" > /usr/local/bin/composer1 \
|
||||
&& chmod 755 /usr/local/bin/composer1 \
|
||||
&& composer1 global require hirak/prestissimo \
|
||||
# Remove installer files.
|
||||
&& rm /opt/composer-setup.php /opt/composer-setup.sha384sum
|
||||
@@ -29,11 +29,11 @@ EXTENSIONS := \
|
||||
xsl \
|
||||
zip \
|
||||
sockets
|
||||
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 latest))
|
||||
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 latest))
|
||||
# Add more extensions to PHP < 7.2.
|
||||
EXTENSIONS += mcrypt
|
||||
endif
|
||||
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 latest))
|
||||
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 latest))
|
||||
# Add more extensions to 5.x series images.
|
||||
EXTENSIONS += mysql
|
||||
else
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
FROM chialab/php:8.0
|
||||
LABEL maintainer="dev@chialab.io"
|
||||
|
||||
# Install XDebug.
|
||||
RUN install-php-extensions xdebug
|
||||
@@ -0,0 +1,5 @@
|
||||
FROM chialab/php:8.0-apache
|
||||
LABEL maintainer="dev@chialab.io"
|
||||
|
||||
# Install XDebug.
|
||||
RUN install-php-extensions xdebug
|
||||
@@ -0,0 +1,5 @@
|
||||
FROM chialab/php:8.0-fpm
|
||||
LABEL maintainer="dev@chialab.io"
|
||||
|
||||
# Install XDebug.
|
||||
RUN install-php-extensions xdebug
|
||||
+2
-2
@@ -30,11 +30,11 @@ EXTENSIONS := \
|
||||
xsl \
|
||||
zip \
|
||||
sockets
|
||||
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 latest))
|
||||
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 latest))
|
||||
# Add more extensions to PHP < 7.2.
|
||||
EXTENSIONS += mcrypt
|
||||
endif
|
||||
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 latest))
|
||||
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 latest))
|
||||
# Add more extensions to 5.x series images.
|
||||
EXTENSIONS += mysql
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user