diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 544f6d3..32f1efb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ["7.0","7.1","7.2","7.3"] + php: ["7.0","7.1","7.2","7.3","7.4"] steps: - uses: actions/checkout@v1 - name: enable experimental features diff --git a/Dockerfile b/Dockerfile index 522cd76..182fd55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -ARG PHP=7.1 +ARG PHP=7.4 FROM php:$PHP-apache #libs: libjudy-dev need this for memprof ARG libs="libfreetype6 libjpeg62-turbo liblz4-tool libjudy-dev" @@ -11,7 +11,8 @@ ARG RUNTIME_PACKAGE_DEPS="$libs $tools msmtp bc locales" ARG BUILD_PACKAGE_DEPS="libcurl4-openssl-dev libjpeg-dev libpng-dev libxml2-dev libzip-dev" -ARG PHP_EXT_DEPS="curl json xml mbstring zip bcmath soap pdo_mysql gd mysqli" + +ARG PHP_EXT_DEPS="curl json xml zip bcmath soap pdo_mysql gd mysqli" ARG PECL_DEPS="memprof xdebug" ARG PHP_MEMORY_LIMIT="-1" @@ -22,7 +23,21 @@ RUN test "$PHP" != "7.0" || pecl install xdebug RUN docker-php-ext-enable xdebug # install dependencies and cleanup (needs to be one step, as else it will cache in the layer) -RUN apt-get update -y \ +RUN test "$PHP" = "7.4" || apt-get update -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install -yf \ + $RUNTIME_PACKAGE_DEPS \ + $BUILD_PACKAGE_DEPS \ + && docker-php-ext-configure gd \ + && docker-php-ext-install -j$(nproc) $PHP_EXT_DEPS \ + && pecl install $PECL_DEPS \ + && docker-php-ext-enable $PECL_DEPS \ + && docker-php-source delete \ + && apt-get clean \ + && apt-get autoremove -y \ + && apt-get purge -y --auto-remove $BUILD_PACKAGE_DEPS \ + && rm -rf /var/lib/apt/lists/* + +RUN test "$PHP" != "7.4" || apt-get update -y \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ $RUNTIME_PACKAGE_DEPS \ $BUILD_PACKAGE_DEPS \