Skip to content

Commit

Permalink
add PHP 7.4 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronjorbin authored and pento committed Aug 7, 2019
1 parent 2657856 commit b375419
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ jobs:
- docker images
- docker push wordpressdevelop/php:7.3-fpm
- docker push wordpressdevelop/php:latest
- name: "php 7.4"
script:
- docker build -t wordpressdevelop/php:7.4-fpm 7.4/php
- docker images
- docker push wordpressdevelop/php:7.4-fpm

- stage: "Build child images"
name: "phpunit 5.2"
Expand Down Expand Up @@ -111,6 +116,11 @@ jobs:
- docker images
- docker push wordpressdevelop/phpunit:7.3-fpm
- docker push wordpressdevelop/phpunit:latest
- name: "phpunit 7.4"
script:
- docker build -t wordpressdevelop/phpunit:7.4-fpm 7.4/phpunit
- docker images
- docker push wordpressdevelop/phpunit:7.4-fpm

- name: "cli 5.2"
script:
Expand Down Expand Up @@ -158,4 +168,9 @@ jobs:
- docker images
- docker push wordpressdevelop/cli:7.3-fpm
- docker push wordpressdevelop/cli:latest
- name: "cli 7.4"
script:
- docker build -t wordpressdevelop/cli:7.4-fpm 7.4/cli
- docker images
- docker push wordpressdevelop/cli:7.4-fpm

33 changes: 33 additions & 0 deletions 7.4/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM wordpressdevelop/php:7.4-fpm

##########################################################################
#
# WARNING: This file was generated by update.php. Do not edit it directly.
#
#


# install wp-cli dependences
RUN set -ex; \
\
apt-get update; \
\
apt-get install -y --no-install-recommends \
less \
virtual-mysql-client \
;

RUN set -ex; \
\
curl -L -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar; \
\
chmod +x /usr/local/bin/wp; \
\
wp --allow-root --version;

ENTRYPOINT [ "/usr/local/bin/wp", "--allow-root" ]


WORKDIR /var/www

CMD [ "shell" ]
31 changes: 31 additions & 0 deletions 7.4/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM php:7.4-rc-fpm

##########################################################################
#
# WARNING: This file was generated by update.php. Do not edit it directly.
#
#

# install the PHP extensions we need
RUN set -ex; \
\
apt-get update; \
\
apt-get install -y --no-install-recommends \
libjpeg-dev \
libpng-dev \
libzip-dev \
; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
docker-php-ext-install gd opcache mysqli zip; \
\
pecl install xdebug-2.8.0beta1;

COPY entrypoint.sh /entrypoint.sh

RUN chmod +x /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]

CMD [ "php-fpm" ]
14 changes: 14 additions & 0 deletions 7.4/php/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -e

# If LOCAL_PHP_XDEBUG=true xdebug extension will be enabled
if [ "$LOCAL_PHP_XDEBUG" = true ]; then
docker-php-ext-enable xdebug
rm -f /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
else
docker-php-ext-enable opcache
rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
fi

# Execute CMD
exec "$@"
13 changes: 13 additions & 0 deletions 7.4/phpunit/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM wordpressdevelop/php:7.4-fpm

##########################################################################
#
# WARNING: This file was generated by update.php. Do not edit it directly.
#
#

RUN curl -sL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit && chmod +x /usr/local/bin/phpunit

WORKDIR /wordpress-develop

CMD /usr/local/bin/phpunit
13 changes: 13 additions & 0 deletions update.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@
'download_url' => 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar',
),
),
'7.4' => array(
'php' => array(
'base_name' => 'php:7.4-rc-fpm',
'gd' => true,
'extensions' => array( 'gd', 'opcache', 'mysqli', 'zip' ),
'pecl_extensions' => array( 'xdebug-2.8.0beta1' ),
),
'phpunit' => 7,
'cli' => array(
'mysql_client' => 'virtual-mysql-client',
'download_url' => 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar',
),
),
);

// A warning that will be added to each Dockerfile, to ensure folks don't edit them directly.
Expand Down

0 comments on commit b375419

Please sign in to comment.