diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 91e4b440..ecd005ee 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -3,18 +3,24 @@ name: Docker PHP Images GitHub workflow on: pull_request: branches: - - 'v3' + - 'v4' push: branches: - - 'v3' + - 'v4' schedule: - - cron: '0 0 * * 0' + - cron: '42 3 * * 0' jobs: build_test_maybe_release: strategy: matrix: include: + - variant: 'cli' + php_version: '8.0' + - variant: 'apache' + php_version: '8.0' + - variant: 'fpm' + php_version: '8.0' - variant: 'cli' php_version: '7.4' - variant: 'apache' @@ -33,12 +39,6 @@ jobs: php_version: '7.2' - variant: 'fpm' php_version: '7.2' - - variant: 'cli' - php_version: '7.1' - - variant: 'apache' - php_version: '7.1' - - variant: 'fpm' - php_version: '7.1' runs-on: ubuntu-latest steps: - name: Set up QEMU @@ -48,7 +48,7 @@ jobs: - uses: actions/checkout@v1 - name: Build and test run: | - PHP_VERSION="${{ matrix.php_version }}" BRANCH="v3" VARIANT="${{ matrix.variant }}" ./build-and-test.sh + PHP_VERSION="${{ matrix.php_version }}" BRANCH="v4" VARIANT="${{ matrix.variant }}" ./build-and-test.sh docker images | grep thecodingmachine/php - name: Login to DockerHub # Merge ~ push. @@ -62,8 +62,15 @@ jobs: if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} run: | BRANCH_VARIANT=`echo "${{ matrix.variant }}" | sed 's/\./-/g'` - docker push thecodingmachine/php:${{ matrix.php_version }}-v3-slim-${BRANCH_VARIANT} - docker push thecodingmachine/php:${{ matrix.php_version }}-v3-${BRANCH_VARIANT} - docker push thecodingmachine/php:${{ matrix.php_version }}-v3-${BRANCH_VARIANT}-node8 - docker push thecodingmachine/php:${{ matrix.php_version }}-v3-${BRANCH_VARIANT}-node10 - docker push thecodingmachine/php:${{ matrix.php_version }}-v3-${BRANCH_VARIANT}-node12 \ No newline at end of file + docker push thecodingmachine/php:${{ matrix.php_version }}-v4-slim-${BRANCH_VARIANT} + docker push thecodingmachine/php:${{ matrix.php_version }}-v4-${BRANCH_VARIANT} + docker push thecodingmachine/php:${{ matrix.php_version }}-v4-${BRANCH_VARIANT}-node8 + docker push thecodingmachine/php:${{ matrix.php_version }}-v4-${BRANCH_VARIANT}-node10 + docker push thecodingmachine/php:${{ matrix.php_version }}-v4-${BRANCH_VARIANT}-node12 + # Let's also tag PHP patch releases + PHP_PATCH_VERSION=`docker run --rm thecodingmachine/php:${{ matrix.php_version }}-v4-slim-${BRANCH_VARIANT} php -v | head -n1 | grep -P '\d+\.\d+\.\d+' -o` + docker push -t thecodingmachine/php:${PHP_PATCH_VERSION}-v4-slim-${BRANCH_VARIANT} thecodingmachine/php:${PHP_VERSION}-v4-slim-${BRANCH_VARIANT} + docker push -t thecodingmachine/php:${PHP_PATCH_VERSION}-v4-${BRANCH_VARIANT} thecodingmachine/php:${PHP_VERSION}-v4-${BRANCH_VARIANT} + docker push -t thecodingmachine/php:${PHP_PATCH_VERSION}-v4-${BRANCH_VARIANT}-node10 thecodingmachine/php:${PHP_VERSION}-v4-${BRANCH_VARIANT}-node10 + docker push -t thecodingmachine/php:${PHP_PATCH_VERSION}-v4-${BRANCH_VARIANT}-node12 thecodingmachine/php:${PHP_VERSION}-v4-${BRANCH_VARIANT}-node12 + docker push -t thecodingmachine/php:${PHP_PATCH_VERSION}-v4-${BRANCH_VARIANT}-node14 thecodingmachine/php:${PHP_VERSION}-v4-${BRANCH_VARIANT}-node14 diff --git a/.gitignore b/.gitignore index 17952c7f..48e1dca8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ .idea -tmp +tmp \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index aa6c85a7..bcfbe7ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +# v4 + +## New features + +- Support for PHP 8.0 +- Support for Node 14 + +## Breaking changes + +- Base image is Ubuntu 20.04 +- Dropped Node 8 images +- Dropped PHP 7.1 + +# v3 + +See MIGRATING.md + # v2 ## New features diff --git a/Dockerfile.apache.node8 b/Dockerfile.apache.node14 similarity index 91% rename from Dockerfile.apache.node8 rename to Dockerfile.apache.node14 index e4cdf049..0fcd0b59 100644 --- a/Dockerfile.apache.node8 +++ b/Dockerfile.apache.node14 @@ -8,7 +8,7 @@ USER root RUN apt-get update && \ apt-get install -y --no-install-recommends gnupg && \ - curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ + curl -sL https://deb.nodesource.com/setup_14.x | bash - && \ apt-get update && \ apt-get install -y --no-install-recommends nodejs && \ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ diff --git a/Dockerfile.cli.node8 b/Dockerfile.cli.node14 similarity index 91% rename from Dockerfile.cli.node8 rename to Dockerfile.cli.node14 index fde41468..0cb4ae72 100644 --- a/Dockerfile.cli.node8 +++ b/Dockerfile.cli.node14 @@ -8,7 +8,7 @@ USER root RUN apt-get update && \ apt-get install -y --no-install-recommends gnupg && \ - curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ + curl -sL https://deb.nodesource.com/setup_14.x | bash - && \ apt-get update && \ apt-get install -y --no-install-recommends nodejs && \ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ diff --git a/Dockerfile.fpm.node8 b/Dockerfile.fpm.node14 similarity index 91% rename from Dockerfile.fpm.node8 rename to Dockerfile.fpm.node14 index d150ff4e..0555d128 100644 --- a/Dockerfile.fpm.node8 +++ b/Dockerfile.fpm.node14 @@ -8,7 +8,7 @@ USER root RUN apt-get update && \ apt-get install -y --no-install-recommends gnupg && \ - curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ + curl -sL https://deb.nodesource.com/setup_14.x | bash - && \ apt-get update && \ apt-get install -y --no-install-recommends nodejs && \ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ diff --git a/Dockerfile.slim.apache b/Dockerfile.slim.apache index dcd22f30..8612ae09 100644 --- a/Dockerfile.slim.apache +++ b/Dockerfile.slim.apache @@ -1,4 +1,4 @@ -FROM ubuntu:bionic +FROM ubuntu:20.04 LABEL authors="Julien Neuhart , David Négrier " @@ -21,7 +21,7 @@ ENV PHP_VERSION=$PHP_VERSION # Install php an other packages RUN apt-get update \ && apt-get install -y --no-install-recommends gnupg \ - && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main" > /etc/apt/sources.list.d/ondrej-php.list \ + && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ondrej-php.list \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \ && apt-get update \ && apt-get install -y --no-install-recommends \ @@ -36,12 +36,12 @@ RUN apt-get update \ curl \ php${PHP_VERSION}-cli \ php${PHP_VERSION}-curl \ - php${PHP_VERSION}-json \ php${PHP_VERSION}-mbstring \ php${PHP_VERSION}-opcache \ php${PHP_VERSION}-readline \ php${PHP_VERSION}-xml \ php${PHP_VERSION}-zip \ + && if [ "${PHP_VERSION}" = "7.1" ] || [ "${PHP_VERSION}" = "7.2" ] || [ "${PHP_VERSION}" = "7.3" ] || [ "${PHP_VERSION}" = "7.4" ]; then apt-get install -y --no-install-recommends php${PHP_VERSION}-json; fi \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* @@ -86,12 +86,15 @@ RUN rm /etc/php/${PHP_VERSION}/cli/php.ini #ENV COMPOSER_ALLOW_SUPERUSER 1 -RUN curl -sS https://getcomposer.org/installer | php -- --1 --install-dir=/usr/local/bin --filename=real_composer &&\ - chmod +x /usr/local/bin/real_composer +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer &&\ + chmod +x /usr/local/bin/composer # TODO: utils.php in /usr/local/bin... bof! COPY utils/utils.php /usr/local/bin/utils.php -COPY utils/composer_proxy.php /usr/local/bin/composer +RUN mv /usr/bin/php /usr/bin/real_php +COPY utils/php_proxy.sh /usr/bin/php +COPY utils/check_php_env_var_changes.php /usr/local/bin/check_php_env_var_changes.php +COPY utils/php_env_var_cache.php /opt/php_env_var_cache.php COPY utils/generate_conf.php /usr/local/bin/generate_conf.php COPY utils/setup_extensions.php /usr/local/bin/setup_extensions.php @@ -129,16 +132,8 @@ ENV PHP_EXTENSION_CALENDAR=1 \ PHP_EXTENSION_XSL=1 \ PHP_EXTENSION_ZIP=1 -# |-------------------------------------------------------------------------- -# | prestissimo -# |-------------------------------------------------------------------------- -# | -# | Installs Prestissimo to improve Composer download performance. -# | - USER docker -RUN composer global require hirak/prestissimo && \ - composer global require bamarni/symfony-console-autocomplete && \ +RUN composer global require bamarni/symfony-console-autocomplete && \ rm -rf ~/.composer/cache USER root @@ -335,7 +330,6 @@ RUN ln -s /etc/php/${PHP_VERSION}/mods-available/generated_conf.ini /etc/php/${P - USER docker COPY utils/install_selected_extensions.php /usr/local/bin/install_selected_extensions.php diff --git a/Dockerfile.slim.cli b/Dockerfile.slim.cli index aa74e567..51b67e2f 100644 --- a/Dockerfile.slim.cli +++ b/Dockerfile.slim.cli @@ -1,4 +1,4 @@ -FROM ubuntu:bionic +FROM ubuntu:20.04 LABEL authors="Julien Neuhart , David Négrier " @@ -21,7 +21,7 @@ ENV PHP_VERSION=$PHP_VERSION # Install php an other packages RUN apt-get update \ && apt-get install -y --no-install-recommends gnupg \ - && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main" > /etc/apt/sources.list.d/ondrej-php.list \ + && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ondrej-php.list \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \ && apt-get update \ && apt-get install -y --no-install-recommends \ @@ -36,12 +36,12 @@ RUN apt-get update \ curl \ php${PHP_VERSION}-cli \ php${PHP_VERSION}-curl \ - php${PHP_VERSION}-json \ php${PHP_VERSION}-mbstring \ php${PHP_VERSION}-opcache \ php${PHP_VERSION}-readline \ php${PHP_VERSION}-xml \ php${PHP_VERSION}-zip \ + && if [ "${PHP_VERSION}" = "7.1" ] || [ "${PHP_VERSION}" = "7.2" ] || [ "${PHP_VERSION}" = "7.3" ] || [ "${PHP_VERSION}" = "7.4" ]; then apt-get install -y --no-install-recommends php${PHP_VERSION}-json; fi \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* @@ -86,12 +86,15 @@ RUN rm /etc/php/${PHP_VERSION}/cli/php.ini #ENV COMPOSER_ALLOW_SUPERUSER 1 -RUN curl -sS https://getcomposer.org/installer | php -- --1 --install-dir=/usr/local/bin --filename=real_composer &&\ - chmod +x /usr/local/bin/real_composer +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer &&\ + chmod +x /usr/local/bin/composer # TODO: utils.php in /usr/local/bin... bof! COPY utils/utils.php /usr/local/bin/utils.php -COPY utils/composer_proxy.php /usr/local/bin/composer +RUN mv /usr/bin/php /usr/bin/real_php +COPY utils/php_proxy.sh /usr/bin/php +COPY utils/check_php_env_var_changes.php /usr/local/bin/check_php_env_var_changes.php +COPY utils/php_env_var_cache.php /opt/php_env_var_cache.php COPY utils/generate_conf.php /usr/local/bin/generate_conf.php COPY utils/setup_extensions.php /usr/local/bin/setup_extensions.php @@ -129,16 +132,8 @@ ENV PHP_EXTENSION_CALENDAR=1 \ PHP_EXTENSION_XSL=1 \ PHP_EXTENSION_ZIP=1 -# |-------------------------------------------------------------------------- -# | prestissimo -# |-------------------------------------------------------------------------- -# | -# | Installs Prestissimo to improve Composer download performance. -# | - USER docker -RUN composer global require hirak/prestissimo && \ - composer global require bamarni/symfony-console-autocomplete && \ +RUN composer global require bamarni/symfony-console-autocomplete && \ rm -rf ~/.composer/cache USER root @@ -240,7 +235,6 @@ RUN touch /etc/php/${PHP_VERSION}/mods-available/generated_conf.ini && ln -s /et - USER docker COPY utils/install_selected_extensions.php /usr/local/bin/install_selected_extensions.php diff --git a/Dockerfile.slim.fpm b/Dockerfile.slim.fpm index 56d03e9d..53f7cee6 100644 --- a/Dockerfile.slim.fpm +++ b/Dockerfile.slim.fpm @@ -1,4 +1,4 @@ -FROM ubuntu:bionic +FROM ubuntu:20.04 LABEL authors="Julien Neuhart , David Négrier " @@ -21,7 +21,7 @@ ENV PHP_VERSION=$PHP_VERSION # Install php an other packages RUN apt-get update \ && apt-get install -y --no-install-recommends gnupg \ - && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main" > /etc/apt/sources.list.d/ondrej-php.list \ + && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ondrej-php.list \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \ && apt-get update \ && apt-get install -y --no-install-recommends \ @@ -36,12 +36,12 @@ RUN apt-get update \ curl \ php${PHP_VERSION}-cli \ php${PHP_VERSION}-curl \ - php${PHP_VERSION}-json \ php${PHP_VERSION}-mbstring \ php${PHP_VERSION}-opcache \ php${PHP_VERSION}-readline \ php${PHP_VERSION}-xml \ php${PHP_VERSION}-zip \ + && if [ "${PHP_VERSION}" = "7.1" ] || [ "${PHP_VERSION}" = "7.2" ] || [ "${PHP_VERSION}" = "7.3" ] || [ "${PHP_VERSION}" = "7.4" ]; then apt-get install -y --no-install-recommends php${PHP_VERSION}-json; fi \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* @@ -86,12 +86,15 @@ RUN rm /etc/php/${PHP_VERSION}/cli/php.ini #ENV COMPOSER_ALLOW_SUPERUSER 1 -RUN curl -sS https://getcomposer.org/installer | php -- --1 --install-dir=/usr/local/bin --filename=real_composer &&\ - chmod +x /usr/local/bin/real_composer +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer &&\ + chmod +x /usr/local/bin/composer # TODO: utils.php in /usr/local/bin... bof! COPY utils/utils.php /usr/local/bin/utils.php -COPY utils/composer_proxy.php /usr/local/bin/composer +RUN mv /usr/bin/php /usr/bin/real_php +COPY utils/php_proxy.sh /usr/bin/php +COPY utils/check_php_env_var_changes.php /usr/local/bin/check_php_env_var_changes.php +COPY utils/php_env_var_cache.php /opt/php_env_var_cache.php COPY utils/generate_conf.php /usr/local/bin/generate_conf.php COPY utils/setup_extensions.php /usr/local/bin/setup_extensions.php @@ -129,16 +132,8 @@ ENV PHP_EXTENSION_CALENDAR=1 \ PHP_EXTENSION_XSL=1 \ PHP_EXTENSION_ZIP=1 -# |-------------------------------------------------------------------------- -# | prestissimo -# |-------------------------------------------------------------------------- -# | -# | Installs Prestissimo to improve Composer download performance. -# | - USER docker -RUN composer global require hirak/prestissimo && \ - composer global require bamarni/symfony-console-autocomplete && \ +RUN composer global require bamarni/symfony-console-autocomplete && \ rm -rf ~/.composer/cache USER root @@ -257,13 +252,12 @@ RUN ln -s /etc/php/${PHP_VERSION}/mods-available/generated_conf.ini /etc/php/${P sed -i 's/^group = www-data/;group = www-data/g' /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf && \ sed -i 's#listen = /run/php/php${PHP_VERSION}-fpm.sock#;listen = /run/php/php${PHP_VERSION}-fpm.sock#g' /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf && \ sed -i "s#pid = /run/php/php${PHP_VERSION}-fpm.pid#;pid = /run/php/php${PHP_VERSION}-fpm.pid#g" /etc/php/${PHP_VERSION}/fpm/php-fpm.conf && \ - if [ "$PHP_VERSION" = "7.1" ] || [ "$PHP_VERSION" = "7.2" ]; then \ + if [ "$PHP_VERSION" = "7.2" ]; then \ sed -i 's/^log_limit =/;log_limit =/g' /etc/php/${PHP_VERSION}/fpm/pool.d/docker.conf && \ sed -i 's/^decorate_workers_output =/;decorate_workers_output =/g' /etc/php/${PHP_VERSION}/fpm/pool.d/docker.conf; \ fi - USER docker COPY utils/install_selected_extensions.php /usr/local/bin/install_selected_extensions.php diff --git a/MIGRATING.md b/MIGRATING.md index 1a5feab2..dd93047c 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -1,9 +1,18 @@ +# Migrating from v3 to v4 images + +Important changes: + +- v3 images are based on **Ubuntu 18.04**. v4 images are based on **Ubuntu 20.04**. +- Internally, the image will attempt to set up extensions / parameters on container startup (in the image entry point), + but also when PHP is run. This should help alleviate a part of the problems when the entrypoint is overloaded by the + user. + # Migrating from v2 to v3 images Important changes: - v2 images are based on a Debian Stretch. v3 images are based on **Ubuntu 18.04**. -- Interally, v3 images are built from the [Ondrej PPA](https://launchpad.net/%7Eondrej/+archive/ubuntu/php/+index?batch=75&memo=75&start=75). +- Internally, v3 images are built from the [Ondrej PPA](https://launchpad.net/%7Eondrej/+archive/ubuntu/php/+index?batch=75&memo=75&start=75). This is a radical change from v2 that was built from the official PHP Docker image. As a result, the v3 image do not have PECL installed, nor a build environment. This makes the v3 images ~200MB lighter. diff --git a/README.md b/README.md index 615bdc6c..6535004d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/thecodingmachine/docker-images-php.svg?branch=v3)](https://travis-ci.org/thecodingmachine/docker-images-php) +[![Build Status](https://travis-ci.org/thecodingmachine/docker-images-php.svg?branch=v4)](https://travis-ci.org/thecodingmachine/docker-images-php) # General purpose PHP images for Docker @@ -20,76 +20,76 @@ This repository contains a set of developer-friendly, general purpose PHP images | Name | PHP version | type |variant | NodeJS version | Size |-------------------------------------------------------------------------|------------------------------|------|--------|-----------------|------ -| [thecodingmachine/php:7.4-v3-apache](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache) | `7.4.x` | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-apache) -| [thecodingmachine/php:7.4-v3-apache-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node8) | `7.4.x` | fat | apache | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-apache-node8.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-apache-node8) -| [thecodingmachine/php:7.4-v3-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node10) | `7.4.x` | fat | apache | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-apache-node10) -| [thecodingmachine/php:7.4-v3-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node12) | `7.4.x` | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-apache-node12) -| [thecodingmachine/php:7.4-v3-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm) | `7.4.x` | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-fpm) -| [thecodingmachine/php:7.4-v3-fpm-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node8) | `7.4.x` | fat | fpm | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-fpm-node8.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-fpm-node8) -| [thecodingmachine/php:7.4-v3-fpm-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node10) | `7.4.x` | fat | fpm | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-fpm-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-fpm-node10) -| [thecodingmachine/php:7.4-v3-fpm-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node12) | `7.4.x` | fat | fpm | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-fpm-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-fpm-node12) -| [thecodingmachine/php:7.4-v3-cli](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli) | `7.4.x` | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-cli) -| [thecodingmachine/php:7.4-v3-cli-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node8) | `7.4.x` | fat | cli | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-cli-node8.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-cli-node8) -| [thecodingmachine/php:7.4-v3-cli-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node10) | `7.4.x` | fat | cli | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-cli-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-cli-node10) -| [thecodingmachine/php:7.4-v3-cli-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node12) | `7.4.x` | fat | cli | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-cli-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-cli-node12) -| [thecodingmachine/php:7.4-v3-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.apache) | `7.4.x` | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-slim-apache) -| [thecodingmachine/php:7.4-v3-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.fpm) | `7.4.x` | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-slim-fpm) -| [thecodingmachine/php:7.4-v3-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.cli) | `7.4.x` | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v3-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v3-slim-cli) -| [thecodingmachine/php:7.3-v3-apache](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache) | `7.3.x` | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-apache) -| [thecodingmachine/php:7.3-v3-apache-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node8) | `7.3.x` | fat | apache | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-apache-node8.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-apache-node8) -| [thecodingmachine/php:7.3-v3-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node10) | `7.3.x` | fat | apache | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-apache-node10) -| [thecodingmachine/php:7.3-v3-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node12) | `7.3.x` | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-apache-node12) -| [thecodingmachine/php:7.3-v3-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm) | `7.3.x` | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-fpm) -| [thecodingmachine/php:7.3-v3-fpm-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node8) | `7.3.x` | fat | fpm | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-fpm-node8.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-fpm-node8) -| [thecodingmachine/php:7.3-v3-fpm-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node10) | `7.3.x` | fat | fpm | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-fpm-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-fpm-node10) -| [thecodingmachine/php:7.3-v3-fpm-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node12) | `7.3.x` | fat | fpm | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-fpm-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-fpm-node12) -| [thecodingmachine/php:7.3-v3-cli](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli) | `7.3.x` | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-cli) -| [thecodingmachine/php:7.3-v3-cli-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node8) | `7.3.x` | fat | cli | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-cli-node8.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-cli-node8) -| [thecodingmachine/php:7.3-v3-cli-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node10) | `7.3.x` | fat | cli | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-cli-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-cli-node10) -| [thecodingmachine/php:7.3-v3-cli-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node12) | `7.3.x` | fat | cli | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-cli-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-cli-node12) -| [thecodingmachine/php:7.3-v3-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.apache) | `7.3.x` | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-slim-apache) -| [thecodingmachine/php:7.3-v3-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.fpm) | `7.3.x` | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-slim-fpm) -| [thecodingmachine/php:7.3-v3-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.cli) | `7.3.x` | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v3-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v3-slim-cli) -| [thecodingmachine/php:7.2-v3-apache](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache) | `7.2.x` | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-apache) -| [thecodingmachine/php:7.2-v3-apache-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node8) | `7.2.x` | fat | apache | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-apache-node8.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-apache-node8) -| [thecodingmachine/php:7.2-v3-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node10) | `7.2.x` | fat | apache | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-apache-node10) -| [thecodingmachine/php:7.2-v3-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node12) | `7.2.x` | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-apache-node12) -| [thecodingmachine/php:7.2-v3-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm) | `7.2.x` | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-fpm) -| [thecodingmachine/php:7.2-v3-fpm-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node8) | `7.2.x` | fat | fpm | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-fpm-node8.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-fpm-node8) -| [thecodingmachine/php:7.2-v3-fpm-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node10) | `7.2.x` | fat | fpm | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-fpm-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-fpm-node10) -| [thecodingmachine/php:7.2-v3-fpm-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node12) | `7.2.x` | fat | fpm | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-fpm-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-fpm-node12) -| [thecodingmachine/php:7.2-v3-cli](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli) | `7.2.x` | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-cli) -| [thecodingmachine/php:7.2-v3-cli-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node8) | `7.2.x` | fat | cli | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-cli-node8.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-cli-node8) -| [thecodingmachine/php:7.2-v3-cli-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node10) | `7.2.x` | fat | cli | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-cli-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-cli-node10) -| [thecodingmachine/php:7.2-v3-cli-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node12) | `7.2.x` | fat | cli | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-cli-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-cli-node12) -| [thecodingmachine/php:7.2-v3-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.apache) | `7.2.x` | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-slim-apache) -| [thecodingmachine/php:7.2-v3-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.fpm) | `7.2.x` | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-slim-fpm) -| [thecodingmachine/php:7.2-v3-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.cli) | `7.2.x` | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v3-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v3-slim-cli) -| [thecodingmachine/php:7.1-v3-apache](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache) | `7.1.x` | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-apache) -| [thecodingmachine/php:7.1-v3-apache-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node8) | `7.1.x` | fat | apache | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-apache-node8.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-apache-node8) -| [thecodingmachine/php:7.1-v3-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node10) | `7.1.x` | fat | apache | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-apache-node10) -| [thecodingmachine/php:7.1-v3-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node12) | `7.1.x` | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-apache-node12) -| [thecodingmachine/php:7.1-v3-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm) | `7.1.x` | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-fpm) -| [thecodingmachine/php:7.1-v3-fpm-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node8) | `7.1.x` | fat | fpm | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-fpm-node8.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-fpm-node8) -| [thecodingmachine/php:7.1-v3-fpm-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node10) | `7.1.x` | fat | fpm | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-fpm-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-fpm-node10) -| [thecodingmachine/php:7.1-v3-fpm-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node12) | `7.1.x` | fat | fpm | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-fpm-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-fpm-node12) -| [thecodingmachine/php:7.1-v3-cli](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli) | `7.1.x` | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-cli) -| [thecodingmachine/php:7.1-v3-cli-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node8) | `7.1.x` | fat | cli | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-cli-node8.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-cli-node8) -| [thecodingmachine/php:7.1-v3-cli-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node10) | `7.1.x` | fat | cli | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-cli-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-cli-node10) -| [thecodingmachine/php:7.1-v3-cli-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node12) | `7.1.x` | fat | cli | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-cli-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-cli-node12) -| [thecodingmachine/php:7.1-v3-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.apache) | `7.1.x` | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-slim-apache) -| [thecodingmachine/php:7.1-v3-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.fpm) | `7.1.x` | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-slim-fpm) -| [thecodingmachine/php:7.1-v3-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.cli) | `7.1.x` | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.1-v3-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.1-v3-slim-cli) - - -Note: we do not tag patch releases of PHP, only minor versions. You will find one image for PHP 7.1, one for PHP 7.2, -but no tagged image for PHP 7.1.12. This is because we believe you have no valid reason to ask explicitly for 7.1.12. -When 7.1.13 is out, you certainly want to upgrade automatically to this patch release since patch releases contain only bugfixes. - -Images are automatically updated when a new patch version of PHP is released, so the PHP 7.1 image will always contain -the most up-to-date version of the PHP 7.1.x branch. If you want to automatically update your images on your production -environment, you can use tools like [watchtower](https://github.com/containrrr/watchtower) that will monitor new versions of -the images and update your environment on the fly. +| [thecodingmachine/php:8.0-v4-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache) | `8.0.x` | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-apache.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-apache) +| [thecodingmachine/php:8.0-v4-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node10) | `8.0.x` | fat | apache | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-apache-node10) +| [thecodingmachine/php:8.0-v4-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node12) | `8.0.x` | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-apache-node12) +| [thecodingmachine/php:8.0-v4-apache-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node14) | `8.0.x` | fat | apache | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-apache-node14.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-apache-node14) +| [thecodingmachine/php:8.0-v4-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm) | `8.0.x` | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-fpm) +| [thecodingmachine/php:8.0-v4-fpm-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node10) | `8.0.x` | fat | fpm | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-fpm-node10.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-fpm-node10) +| [thecodingmachine/php:8.0-v4-fpm-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node12) | `8.0.x` | fat | fpm | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-fpm-node12.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-fpm-node12) +| [thecodingmachine/php:8.0-v4-fpm-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node14) | `8.0.x` | fat | fpm | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-fpm-node14.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-fpm-node14) +| [thecodingmachine/php:8.0-v4-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli) | `8.0.x` | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-cli.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-cli) +| [thecodingmachine/php:8.0-v4-cli-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node10) | `8.0.x` | fat | cli | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-cli-node10.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-cli-node10) +| [thecodingmachine/php:8.0-v4-cli-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node12) | `8.0.x` | fat | cli | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-cli-node12.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-cli-node12) +| [thecodingmachine/php:8.0-v4-cli-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node14) | `8.0.x` | fat | cli | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-cli-node14.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-cli-node14) +| [thecodingmachine/php:8.0-v4-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.apache) | `8.0.x` | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-slim-apache) +| [thecodingmachine/php:8.0-v4-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.fpm) | `8.0.x` | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-slim-fpm) +| [thecodingmachine/php:8.0-v4-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.cli) | `8.0.x` | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-slim-cli) +| [thecodingmachine/php:7.4-v4-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache) | `7.4.x` | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-apache) +| [thecodingmachine/php:7.4-v4-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node10) | `7.4.x` | fat | apache | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-apache-node10) +| [thecodingmachine/php:7.4-v4-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node12) | `7.4.x` | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-apache-node12) +| [thecodingmachine/php:7.4-v4-apache-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node14) | `7.4.x` | fat | apache | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-apache-node14.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-apache-node14) +| [thecodingmachine/php:7.4-v4-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm) | `7.4.x` | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-fpm) +| [thecodingmachine/php:7.4-v4-fpm-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node10) | `7.4.x` | fat | fpm | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-fpm-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-fpm-node10) +| [thecodingmachine/php:7.4-v4-fpm-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node12) | `7.4.x` | fat | fpm | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-fpm-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-fpm-node12) +| [thecodingmachine/php:7.4-v4-fpm-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node14) | `7.4.x` | fat | fpm | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-fpm-node14.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-fpm-node14) +| [thecodingmachine/php:7.4-v4-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli) | `7.4.x` | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-cli) +| [thecodingmachine/php:7.4-v4-cli-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node10) | `7.4.x` | fat | cli | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-cli-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-cli-node10) +| [thecodingmachine/php:7.4-v4-cli-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node12) | `7.4.x` | fat | cli | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-cli-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-cli-node12) +| [thecodingmachine/php:7.4-v4-cli-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node14) | `7.4.x` | fat | cli | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-cli-node14.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-cli-node14) +| [thecodingmachine/php:7.4-v4-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.apache) | `7.4.x` | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-slim-apache) +| [thecodingmachine/php:7.4-v4-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.fpm) | `7.4.x` | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-slim-fpm) +| [thecodingmachine/php:7.4-v4-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.cli) | `7.4.x` | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.4-v4-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.4-v4-slim-cli) +| [thecodingmachine/php:7.3-v4-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache) | `7.3.x` | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-apache) +| [thecodingmachine/php:7.3-v4-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node10) | `7.3.x` | fat | apache | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-apache-node10) +| [thecodingmachine/php:7.3-v4-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node12) | `7.3.x` | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-apache-node12) +| [thecodingmachine/php:7.3-v4-apache-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node14) | `7.3.x` | fat | apache | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-apache-node14.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-apache-node14) +| [thecodingmachine/php:7.3-v4-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm) | `7.3.x` | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-fpm) +| [thecodingmachine/php:7.3-v4-fpm-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node10) | `7.3.x` | fat | fpm | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-fpm-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-fpm-node10) +| [thecodingmachine/php:7.3-v4-fpm-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node12) | `7.3.x` | fat | fpm | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-fpm-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-fpm-node12) +| [thecodingmachine/php:7.3-v4-fpm-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node14) | `7.3.x` | fat | fpm | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-fpm-node14.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-fpm-node14) +| [thecodingmachine/php:7.3-v4-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli) | `7.3.x` | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-cli) +| [thecodingmachine/php:7.3-v4-cli-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node10) | `7.3.x` | fat | cli | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-cli-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-cli-node10) +| [thecodingmachine/php:7.3-v4-cli-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node12) | `7.3.x` | fat | cli | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-cli-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-cli-node12) +| [thecodingmachine/php:7.3-v4-cli-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node14) | `7.3.x` | fat | cli | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-cli-node14.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-cli-node14) +| [thecodingmachine/php:7.3-v4-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.apache) | `7.3.x` | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-slim-apache) +| [thecodingmachine/php:7.3-v4-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.fpm) | `7.3.x` | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-slim-fpm) +| [thecodingmachine/php:7.3-v4-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.cli) | `7.3.x` | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.3-v4-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.3-v4-slim-cli) +| [thecodingmachine/php:7.2-v4-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache) | `7.2.x` | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-apache) +| [thecodingmachine/php:7.2-v4-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node10) | `7.2.x` | fat | apache | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-apache-node10) +| [thecodingmachine/php:7.2-v4-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node12) | `7.2.x` | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-apache-node12) +| [thecodingmachine/php:7.2-v4-apache-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node14) | `7.2.x` | fat | apache | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-apache-node14.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-apache-node14) +| [thecodingmachine/php:7.2-v4-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm) | `7.2.x` | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-fpm) +| [thecodingmachine/php:7.2-v4-fpm-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node10) | `7.2.x` | fat | fpm | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-fpm-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-fpm-node10) +| [thecodingmachine/php:7.2-v4-fpm-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node12) | `7.2.x` | fat | fpm | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-fpm-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-fpm-node12) +| [thecodingmachine/php:7.2-v4-fpm-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node14) | `7.2.x` | fat | fpm | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-fpm-node14.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-fpm-node14) +| [thecodingmachine/php:7.2-v4-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli) | `7.2.x` | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-cli) +| [thecodingmachine/php:7.2-v4-cli-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node10) | `7.2.x` | fat | cli | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-cli-node10.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-cli-node10) +| [thecodingmachine/php:7.2-v4-cli-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node12) | `7.2.x` | fat | cli | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-cli-node12.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-cli-node12) +| [thecodingmachine/php:7.2-v4-cli-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node14) | `7.2.x` | fat | cli | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-cli-node14.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-cli-node14) +| [thecodingmachine/php:7.2-v4-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.apache) | `7.2.x` | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-slim-apache) +| [thecodingmachine/php:7.2-v4-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.fpm) | `7.2.x` | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-slim-fpm) +| [thecodingmachine/php:7.2-v4-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.cli) | `7.2.x` | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:7.2-v4-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:7.2-v4-slim-cli) + + + +Note: we also tag patch releases of PHP versions. So you can specify a specific patch release using thecodingmachine/php:**8.0.2**-v4-cli for instance. +However, unless you have a **very specific need** (for instance if the latest patch release of PHP introduced regressions), believe you have no valid reason to ask explicitly for 8.0.2 for instance. +When 8.0.3 is out, you certainly want to upgrade automatically to this patch release since patch releases contain only bugfixes. +Also, we automatically rebuild X.Y images every week, but only the latest X.Y.Z patch release gets a rebuild. The other patch releases are frozen in time and will contain bugs and security issues. So use those with great care. + +[Major].[minor] images are automatically updated when a new patch version of PHP is released, so the PHP 7.4 image will always contain +the most up-to-date version of the PHP 7.4.x branch. ## Usage @@ -98,26 +98,26 @@ These images are based on the [official PHP image](https://hub.docker.com/_/php/ Example with CLI: ```bash -$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app thecodingmachine/php:7.4-v3-cli php your-script.php +$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app thecodingmachine/php:7.4-v4-cli php your-script.php ``` Example with Apache: ```bash -$ docker run -p 80:80 --rm --name my-apache-php-app -v "$PWD":/var/www/html thecodingmachine/php:7.4-v3-apache +$ docker run -p 80:80 --rm --name my-apache-php-app -v "$PWD":/var/www/html thecodingmachine/php:7.4-v4-apache ``` Example with PHP-FPM: ```bash -$ docker run -p 9000:9000 --rm --name my-php-fpm -v "$PWD":/var/www/html thecodingmachine/php:7.4-v3-fpm +$ docker run -p 9000:9000 --rm --name my-php-fpm -v "$PWD":/var/www/html thecodingmachine/php:7.4-v4-fpm ``` Example with Apache + Node 8.x in a Dockerfile: **Dockerfile** ```Dockerfile -FROM thecodingmachine/php:7.4-v3-apache-node8 +FROM thecodingmachine/php:7.4-v4-apache-node14 COPY src/ /var/www/html/ RUN composer install @@ -152,6 +152,8 @@ Below is a list of extensions available in this image: - *mcrypt* is not available anymore in PHP 7.3+ - *weakref* is not compatible with PHP 7.3+ (but weak references were added to the PHP core in PHP 7.4) +- *sybase* extension is not available in v4 (use v3) +- *ev*, *event*, *gnupg*, *mongodb*, *rdkafka*, *swoole*, *uploadprogress*, *xmlrpc*, *blackfire* are not available in PHP 8.0+ ### Enabling/disabling extensions in the fat image @@ -163,7 +165,7 @@ For instance: version: '3' services: my_app: - image: thecodingmachine/php:7.4-v3-apache-node8 + image: thecodingmachine/php:7.4-v4-apache-node14 environment: # Enable the PostgreSQL extension PHP_EXTENSION_PGSQL: 1 @@ -183,7 +185,7 @@ If you are using the slim image, you can automatically compile the extensions us ```Dockerfile ARG PHP_EXTENSIONS="apcu mysqli pdo_mysql redis soap" -FROM thecodingmachine/php:7.4-v3-slim-apache +FROM thecodingmachine/php:7.4-v4-slim-apache # The build will automatically trigger the download and compilation # of the extensions (thanks to a ONBUILD hook in the slim image) ``` @@ -200,7 +202,7 @@ first FROM): # The PHP_EXTENSIONS ARG will apply to the "slim" image ARG PHP_EXTENSIONS="apcu mysqli opcache pdo_mysql zip soap" -FROM thecodingmachine/php:7.2-v3-apache-node10 AS builder +FROM thecodingmachine/php:7.2-v4-apache-node10 AS builder COPY --chown=docker:docker sources/web . RUN composer install &&\ @@ -208,7 +210,7 @@ RUN composer install &&\ yarn build # The slim image will automatically build the extensions from the list provided at the very top of the file. -FROM thecodingmachine/php:7.2-v3-slim-apache +FROM thecodingmachine/php:7.2-v4-slim-apache ENV APP_ENV=prod \ APACHE_DOCUMENT_ROOT=public/ @@ -236,7 +238,7 @@ You can override parameters in `php.ini` using the PHP_INI_XXX environment varia version: '3' services: my_app: - image: thecodingmachine/php:7.4-v3-apache-node8 + image: thecodingmachine/php:7.4-v4-apache-node14 environment: # set the parameter memory_limit=1g PHP_INI_MEMORY_LIMIT: 1g @@ -298,7 +300,7 @@ For instance: version: '3' services: my_app: - image: thecodingmachine/php:7.4-v3-apache-node8 + image: thecodingmachine/php:7.4-v4-apache-node14 environment: # Enable the DAV extension for Apache APACHE_EXTENSION_DAV: 1 @@ -325,23 +327,23 @@ To enable XDebug, you simply have to set the environment variable: PHP_EXTENSION_XDEBUG=1 ``` -If you enable XDebug, the image will do its best to configure the `xdebug.remote_host` to point back to your Docker host. +If you enable XDebug, the image will do its best to configure the `xdebug.client_host` to point back to your Docker host. Behind the scenes, the image will: -- set the parameter `xdebug.remote_enable=1` -- if you are using a Linux or Windows machine, the `xdebug.remote_host` IP will point to your Docker gateway -- if you are using a MaxOS machine, the `xdebug.remote_host` IP will point to [`docker.for.mac.localhost`](https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds) +- set the parameter `xdebug.mode=debug` +- if you are using a Linux machine, the `xdebug.client_host` IP will point to your Docker gateway +- if you are using a Windows or MaxOS machine, the `xdebug.client_host` IP will point to [`host.docker.internal`](https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds) or [`docker.for.mac.localhost`](https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds) ## NodeJS -The *fat* images come with a Node variant. You can use Node 8 or Node 10. If you need a Node 6 variant, [use thecodingmachine/php v1 images](https://github.com/thecodingmachine/docker-images-php/tree/7.2-v1). +The *fat* images come with a Node variant. You can use Node 10, 12 or 14. If you need a Node 8 variant, [use thecodingmachine/php v4 images](https://github.com/thecodingmachine/docker-images-php/tree/v4). If you need a Node 6 variant, [use thecodingmachine/php v1 images](https://github.com/thecodingmachine/docker-images-php/tree/7.2-v1). If you use the *slim* images, you can install a NodeJS version with a simple ARG during the build: ```Dockerfile -ARG NODE_VERSION=10 -FROM thecodingmachine/php:7.4-v3-slim-apache +ARG NODE_VERSION=14 +FROM thecodingmachine/php:7.4-v4-slim-apache # The build will automatically trigger the download of Node 10 # (thanks to a ONBUILD hook in the slim image) ``` @@ -394,7 +396,7 @@ This can be done easily: **Dockerfile** ``` -FROM thecodingmachine/php:7.4-v3-apache +FROM thecodingmachine/php:7.4-v4-apache # ... @@ -438,7 +440,7 @@ a single argument before the "FROM" clause in your Dockerfile: ```Dockerfile ARG INSTALL_CRON=1 -FROM thecodingmachine/php:7.4-v3-slim-apache +FROM thecodingmachine/php:7.4-v4-slim-apache # The build triggers automatically the installation of Cron ``` @@ -491,12 +493,12 @@ If such a file is mounted in the image, it will be executed on container startup ```bash docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp \ - -v $PWD/my-startup-script.sh:/etc/container/startup.sh thecodingmachine/php:7.4-v3-cli php your-script.php + -v $PWD/my-startup-script.sh:/etc/container/startup.sh thecodingmachine/php:7.4-v4-cli php your-script.php ``` ## Using the CLI variant -The CLI images (thecodingmachine/php:7.x-v3-cli) expect a command to be passed in parameter. +The CLI images (thecodingmachine/php:7.x-v4-cli) expect a command to be passed in parameter. You should override the Docker "command". Important! You should not override the Docker "entrypoint". @@ -504,7 +506,7 @@ Important! You should not override the Docker "entrypoint". **Usage in a Dockerfile:** ```Dockerfile -FROM thecodingmachine/php:7.4-v3-cli +FROM thecodingmachine/php:7.4-v4-cli CMD ["php", "myprogram.php", "some_param"] ``` @@ -516,7 +518,7 @@ CMD ["php", "myprogram.php", "some_param"] version: '3' services: my_app: - image: thecodingmachine/php:7.4-v3-cli + image: thecodingmachine/php:7.4-v4-cli command: php myprogram.php some_param ``` @@ -536,7 +538,7 @@ This option is the easiest way to go if you are using the image on a development version: '3' services: my_app: - image: thecodingmachine/php:7.4-v3-apache-node8 + image: thecodingmachine/php:7.4-v4-apache-node14 volumes: - ~/.ssh:/home/docker/.ssh ``` @@ -557,7 +559,7 @@ Now, let's write a Dockerfile. **Dockerfile** ```yml -FROM thecodingmachine/php:7.4-v3-apache +FROM thecodingmachine/php:7.4-v4-apache ARG SSH_PRIVATE_KEY ARG SSH_KNOWN_HOSTS @@ -595,7 +597,7 @@ kind: Pod spec: containers: - name: foobar - image: thecodingmachine/php:7.4-v3-apache + image: thecodingmachine/php:7.4-v4-apache securityContext: allowPrivilegeEscalation: true # never use "false" here. ``` @@ -617,7 +619,7 @@ Your `docker-compose.yml` file will typically look like this: version: '3.3' services: php: - image: thecodingmachine/php:7.4-v3-apache + image: thecodingmachine/php:7.4-v4-apache ports: - "80:80" environment: @@ -643,7 +645,7 @@ If for some reason, the container name is not "blackfire", you can customize the version: '3.3' services: php: - image: thecodingmachine/php:7.4-v3-apache + image: thecodingmachine/php:7.4-v4-apache environment: PHP_EXTENSION_BLACKFIRE: 1 BLACKFIRE_AGENT: myblackfire @@ -678,7 +680,7 @@ This command will generate all the files from the "blueprint" templates. You can then test your changes using the `build-and-test.sh` command: ```bash -PHP_VERSION=7.4 BRANCH=v3 VARIANT=apache ./build-and-test.sh +PHP_VERSION=7.4 BRANCH=v4 VARIANT=apache ./build-and-test.sh ``` ### Adding additional images diff --git a/build-and-test.sh b/build-and-test.sh index 9f6b5d33..ce89a700 100755 --- a/build-and-test.sh +++ b/build-and-test.sh @@ -176,10 +176,10 @@ docker run --rm -e PHP_EXTENSION_MBSTRING=0 thecodingmachine/php:${PHP_VERSION}- [[ "$?" = "1" ]] set -e -# Let's check that the "xdebug.remote_host" contains a value different from "no value" -docker run --rm -e PHP_EXTENSION_XDEBUG=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.remote_host| grep -v "no value" +# Let's check that the "xdebug.client_host" contains a value different from "no value" +docker run --rm -e PHP_EXTENSION_XDEBUG=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.client_host| grep -v "no value" -if [[ "${PHP_VERSION}" != "7.4" ]]; then +if [[ "${PHP_VERSION}" != "7.4" ]] && [[ "${PHP_VERSION}" != "8.0" ]]; then # Tests that blackfire + xdebug will output an error RESULT=`docker run --rm -e PHP_EXTENSION_XDEBUG=1 -e PHP_EXTENSION_BLACKFIRE=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -v 2>&1 | grep 'WARNING: Both Blackfire and Xdebug are enabled. This is not recommended as the PHP engine may not behave as expected. You should strongly consider disabling Xdebug or Blackfire.'` [[ "$RESULT" = "WARNING: Both Blackfire and Xdebug are enabled. This is not recommended as the PHP engine may not behave as expected. You should strongly consider disabling Xdebug or Blackfire." ]] @@ -197,8 +197,8 @@ docker rmi test/composer_with_gd ################################# # Let's build the "node" images ################################# -docker build -t thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}-node8 --build-arg PHP_VERSION=${PHP_VERSION} --build-arg GLOBAL_VERSION=${BRANCH} -f Dockerfile.${VARIANT}.node8 . docker build -t thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}-node10 --build-arg PHP_VERSION=${PHP_VERSION} --build-arg GLOBAL_VERSION=${BRANCH} -f Dockerfile.${VARIANT}.node10 . docker build -t thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}-node12 --build-arg PHP_VERSION=${PHP_VERSION} --build-arg GLOBAL_VERSION=${BRANCH} -f Dockerfile.${VARIANT}.node12 . +docker build -t thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}-node14 --build-arg PHP_VERSION=${PHP_VERSION} --build-arg GLOBAL_VERSION=${BRANCH} -f Dockerfile.${VARIANT}.node14 . echo "Tests passed with success" diff --git a/extensions/7.1/amqp b/extensions/7.1/amqp deleted file mode 120000 index f66005fc..00000000 --- a/extensions/7.1/amqp +++ /dev/null @@ -1 +0,0 @@ -../core/amqp \ No newline at end of file diff --git a/extensions/7.1/blackfire b/extensions/7.1/blackfire deleted file mode 120000 index 1179c0b9..00000000 --- a/extensions/7.1/blackfire +++ /dev/null @@ -1 +0,0 @@ -../core/blackfire \ No newline at end of file diff --git a/extensions/7.1/ev b/extensions/7.1/ev deleted file mode 120000 index d523a2c1..00000000 --- a/extensions/7.1/ev +++ /dev/null @@ -1 +0,0 @@ -../core/ev \ No newline at end of file diff --git a/extensions/7.1/event b/extensions/7.1/event deleted file mode 120000 index 67569f41..00000000 --- a/extensions/7.1/event +++ /dev/null @@ -1 +0,0 @@ -../core/event \ No newline at end of file diff --git a/extensions/7.1/gettext b/extensions/7.1/gettext deleted file mode 120000 index 0369641a..00000000 --- a/extensions/7.1/gettext +++ /dev/null @@ -1 +0,0 @@ -../core/gettext \ No newline at end of file diff --git a/extensions/7.1/gnupg b/extensions/7.1/gnupg deleted file mode 120000 index 002cc7b2..00000000 --- a/extensions/7.1/gnupg +++ /dev/null @@ -1 +0,0 @@ -../core/gnupg \ No newline at end of file diff --git a/extensions/7.1/mcrypt b/extensions/7.1/mcrypt deleted file mode 120000 index 73504723..00000000 --- a/extensions/7.1/mcrypt +++ /dev/null @@ -1 +0,0 @@ -../core/mcrypt-7.1/ \ No newline at end of file diff --git a/extensions/7.1/mongodb b/extensions/7.1/mongodb deleted file mode 120000 index 7898c8e7..00000000 --- a/extensions/7.1/mongodb +++ /dev/null @@ -1 +0,0 @@ -../core/mongodb \ No newline at end of file diff --git a/extensions/7.1/pcov b/extensions/7.1/pcov deleted file mode 120000 index b99a0dd2..00000000 --- a/extensions/7.1/pcov +++ /dev/null @@ -1 +0,0 @@ -../core/pcov \ No newline at end of file diff --git a/extensions/7.1/pdo_dblib b/extensions/7.1/pdo_dblib deleted file mode 120000 index 2261140c..00000000 --- a/extensions/7.1/pdo_dblib +++ /dev/null @@ -1 +0,0 @@ -../core/pdo_dblib \ No newline at end of file diff --git a/extensions/7.1/rdkafka b/extensions/7.1/rdkafka deleted file mode 120000 index 8fce5d9f..00000000 --- a/extensions/7.1/rdkafka +++ /dev/null @@ -1 +0,0 @@ -../core/rdkafka/ \ No newline at end of file diff --git a/extensions/7.1/swoole b/extensions/7.1/swoole deleted file mode 120000 index f20d56ed..00000000 --- a/extensions/7.1/swoole +++ /dev/null @@ -1 +0,0 @@ -../core/swoole \ No newline at end of file diff --git a/extensions/7.1/uploadprogress b/extensions/7.1/uploadprogress deleted file mode 120000 index b18aa3c5..00000000 --- a/extensions/7.1/uploadprogress +++ /dev/null @@ -1 +0,0 @@ -../core/uploadprogress/ \ No newline at end of file diff --git a/extensions/7.1/weakref b/extensions/7.1/weakref deleted file mode 120000 index 172cf7e0..00000000 --- a/extensions/7.1/weakref +++ /dev/null @@ -1 +0,0 @@ -../core/weakref \ No newline at end of file diff --git a/extensions/7.1/xdebug b/extensions/7.1/xdebug deleted file mode 120000 index 2ee34925..00000000 --- a/extensions/7.1/xdebug +++ /dev/null @@ -1 +0,0 @@ -../core/xdebug \ No newline at end of file diff --git a/extensions/7.1/xmlrpc b/extensions/7.1/xmlrpc deleted file mode 120000 index 2833c799..00000000 --- a/extensions/7.1/xmlrpc +++ /dev/null @@ -1 +0,0 @@ -../core/xmlrpc \ No newline at end of file diff --git a/extensions/7.2/gettext b/extensions/7.2/gettext deleted file mode 120000 index 0369641a..00000000 --- a/extensions/7.2/gettext +++ /dev/null @@ -1 +0,0 @@ -../core/gettext \ No newline at end of file diff --git a/extensions/7.2/pdo_dblib b/extensions/7.2/pdo_dblib deleted file mode 120000 index 2261140c..00000000 --- a/extensions/7.2/pdo_dblib +++ /dev/null @@ -1 +0,0 @@ -../core/pdo_dblib \ No newline at end of file diff --git a/extensions/7.3/gettext b/extensions/7.3/gettext deleted file mode 120000 index 0369641a..00000000 --- a/extensions/7.3/gettext +++ /dev/null @@ -1 +0,0 @@ -../core/gettext \ No newline at end of file diff --git a/extensions/7.3/pdo_dblib b/extensions/7.3/pdo_dblib deleted file mode 120000 index 2261140c..00000000 --- a/extensions/7.3/pdo_dblib +++ /dev/null @@ -1 +0,0 @@ -../core/pdo_dblib \ No newline at end of file diff --git a/extensions/7.4/gettext b/extensions/7.4/gettext deleted file mode 120000 index 0369641a..00000000 --- a/extensions/7.4/gettext +++ /dev/null @@ -1 +0,0 @@ -../core/gettext \ No newline at end of file diff --git a/extensions/7.4/pdo_dblib b/extensions/7.4/pdo_dblib deleted file mode 120000 index 2261140c..00000000 --- a/extensions/7.4/pdo_dblib +++ /dev/null @@ -1 +0,0 @@ -../core/pdo_dblib \ No newline at end of file diff --git a/extensions/8.0/amqp b/extensions/8.0/amqp new file mode 120000 index 00000000..67752699 --- /dev/null +++ b/extensions/8.0/amqp @@ -0,0 +1 @@ +../core/amqp/ \ No newline at end of file diff --git a/extensions/7.1/apcu b/extensions/8.0/apcu similarity index 100% rename from extensions/7.1/apcu rename to extensions/8.0/apcu diff --git a/extensions/7.1/ast b/extensions/8.0/ast similarity index 100% rename from extensions/7.1/ast rename to extensions/8.0/ast diff --git a/extensions/7.1/bcmath b/extensions/8.0/bcmath similarity index 100% rename from extensions/7.1/bcmath rename to extensions/8.0/bcmath diff --git a/extensions/7.1/bz2 b/extensions/8.0/bz2 similarity index 100% rename from extensions/7.1/bz2 rename to extensions/8.0/bz2 diff --git a/extensions/7.1/dba b/extensions/8.0/dba similarity index 100% rename from extensions/7.1/dba rename to extensions/8.0/dba diff --git a/extensions/7.1/disable_all.sh b/extensions/8.0/disable_all.sh similarity index 100% rename from extensions/7.1/disable_all.sh rename to extensions/8.0/disable_all.sh diff --git a/extensions/7.1/docker-install.sh b/extensions/8.0/docker-install.sh similarity index 100% rename from extensions/7.1/docker-install.sh rename to extensions/8.0/docker-install.sh diff --git a/extensions/7.1/ds b/extensions/8.0/ds similarity index 100% rename from extensions/7.1/ds rename to extensions/8.0/ds diff --git a/extensions/7.1/enchant b/extensions/8.0/enchant similarity index 100% rename from extensions/7.1/enchant rename to extensions/8.0/enchant diff --git a/extensions/7.1/gd b/extensions/8.0/gd similarity index 100% rename from extensions/7.1/gd rename to extensions/8.0/gd diff --git a/extensions/7.1/gmp b/extensions/8.0/gmp similarity index 100% rename from extensions/7.1/gmp rename to extensions/8.0/gmp diff --git a/extensions/7.1/igbinary b/extensions/8.0/igbinary similarity index 100% rename from extensions/7.1/igbinary rename to extensions/8.0/igbinary diff --git a/extensions/7.1/imagick b/extensions/8.0/imagick similarity index 100% rename from extensions/7.1/imagick rename to extensions/8.0/imagick diff --git a/extensions/7.1/imap b/extensions/8.0/imap similarity index 100% rename from extensions/7.1/imap rename to extensions/8.0/imap diff --git a/extensions/7.1/install_all.sh b/extensions/8.0/install_all.sh similarity index 100% rename from extensions/7.1/install_all.sh rename to extensions/8.0/install_all.sh diff --git a/extensions/7.1/intl b/extensions/8.0/intl similarity index 100% rename from extensions/7.1/intl rename to extensions/8.0/intl diff --git a/extensions/7.1/ldap b/extensions/8.0/ldap similarity index 100% rename from extensions/7.1/ldap rename to extensions/8.0/ldap diff --git a/extensions/7.1/mailparse b/extensions/8.0/mailparse similarity index 100% rename from extensions/7.1/mailparse rename to extensions/8.0/mailparse diff --git a/extensions/7.1/memcached b/extensions/8.0/memcached similarity index 100% rename from extensions/7.1/memcached rename to extensions/8.0/memcached diff --git a/extensions/7.1/msgpack b/extensions/8.0/msgpack similarity index 100% rename from extensions/7.1/msgpack rename to extensions/8.0/msgpack diff --git a/extensions/7.1/mysqli b/extensions/8.0/mysqli similarity index 100% rename from extensions/7.1/mysqli rename to extensions/8.0/mysqli diff --git a/extensions/7.1/pdo_mysql b/extensions/8.0/pdo_mysql similarity index 100% rename from extensions/7.1/pdo_mysql rename to extensions/8.0/pdo_mysql diff --git a/extensions/7.1/pdo_pgsql b/extensions/8.0/pdo_pgsql similarity index 100% rename from extensions/7.1/pdo_pgsql rename to extensions/8.0/pdo_pgsql diff --git a/extensions/7.1/pdo_sqlite b/extensions/8.0/pdo_sqlite similarity index 100% rename from extensions/7.1/pdo_sqlite rename to extensions/8.0/pdo_sqlite diff --git a/extensions/7.1/pgsql b/extensions/8.0/pgsql similarity index 100% rename from extensions/7.1/pgsql rename to extensions/8.0/pgsql diff --git a/extensions/7.1/pspell b/extensions/8.0/pspell similarity index 100% rename from extensions/7.1/pspell rename to extensions/8.0/pspell diff --git a/extensions/7.1/redis b/extensions/8.0/redis similarity index 100% rename from extensions/7.1/redis rename to extensions/8.0/redis diff --git a/extensions/7.1/snmp b/extensions/8.0/snmp similarity index 100% rename from extensions/7.1/snmp rename to extensions/8.0/snmp diff --git a/extensions/7.1/soap b/extensions/8.0/soap similarity index 100% rename from extensions/7.1/soap rename to extensions/8.0/soap diff --git a/extensions/7.1/sqlite3 b/extensions/8.0/sqlite3 similarity index 100% rename from extensions/7.1/sqlite3 rename to extensions/8.0/sqlite3 diff --git a/extensions/7.1/tidy b/extensions/8.0/tidy similarity index 100% rename from extensions/7.1/tidy rename to extensions/8.0/tidy diff --git a/extensions/7.1/uuid b/extensions/8.0/uuid similarity index 100% rename from extensions/7.1/uuid rename to extensions/8.0/uuid diff --git a/extensions/8.0/xdebug b/extensions/8.0/xdebug new file mode 120000 index 00000000..ee4c5321 --- /dev/null +++ b/extensions/8.0/xdebug @@ -0,0 +1 @@ +../core/xdebug/ \ No newline at end of file diff --git a/extensions/7.1/yaml b/extensions/8.0/yaml similarity index 100% rename from extensions/7.1/yaml rename to extensions/8.0/yaml diff --git a/extensions/core/apcu/install.sh b/extensions/core/apcu/install.sh index b6405124..7e920e3d 100755 --- a/extensions/core/apcu/install.sh +++ b/extensions/core/apcu/install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -e -export PECL_EXTENSION=apcu +export EXTENSION=apcu ../docker-install.sh diff --git a/extensions/core/docker-install.sh b/extensions/core/docker-install.sh index 102c6ab7..fe52c775 100755 --- a/extensions/core/docker-install.sh +++ b/extensions/core/docker-install.sh @@ -48,9 +48,9 @@ fi if [ -n "$EXTENSION" ]; then # Let's perform a test phpenmod $EXTENSION - php -m | grep "${PHP_EXT_PHP_NAME:-${PHP_EXT_NAME:-$EXTENSION}}" + /usr/bin/real_php -m | grep "${PHP_EXT_PHP_NAME:-${PHP_EXT_NAME:-$EXTENSION}}" # Check that there is no output on STDERR when starting php: - OUTPUT=`php -r "echo '';" 2>&1` + OUTPUT=`/usr/bin/real_php -r "echo '';" 2>&1` [[ "$OUTPUT" == "" ]] # And now, let's disable it! phpdismod $EXTENSION @@ -58,12 +58,13 @@ fi if [ -n "$PECL_EXTENSION" ]; then # Let's perform a test - PHP_EXTENSIONS="${PHP_EXT_NAME:-$PECL_EXTENSION}" php /usr/local/bin/setup_extensions.php | bash - PHP_EXTENSIONS="${PHP_EXT_NAME:-$PECL_EXTENSION}" php /usr/local/bin/generate_conf.php > /etc/php/${PHP_VERSION}/cli/conf.d/testextension.ini - php -m | grep "${PHP_EXT_PHP_NAME:-${PHP_EXT_NAME:-$PECL_EXTENSION}}" + PHP_EXTENSIONS="${PHP_EXT_NAME:-$PECL_EXTENSION}" /usr/bin/real_php /usr/local/bin/setup_extensions.php | bash + PHP_EXTENSIONS="${PHP_EXT_NAME:-$PECL_EXTENSION}" /usr/bin/real_php /usr/local/bin/generate_conf.php > /etc/php/${PHP_VERSION}/cli/conf.d/testextension.ini + + /usr/bin/real_php -m | grep "${PHP_EXT_PHP_NAME:-${PHP_EXT_NAME:-$PECL_EXTENSION}}" # Check that there is no output on STDERR when starting php: - OUTPUT=`php -r "echo '';" 2>&1` + OUTPUT=`/usr/bin/real_php -r "echo '';" 2>&1` [[ "$OUTPUT" == "" ]] - PHP_EXTENSIONS="" php /usr/local/bin/setup_extensions.php | bash + PHP_EXTENSIONS="" /usr/bin/real_php /usr/local/bin/setup_extensions.php | bash rm /etc/php/${PHP_VERSION}/cli/conf.d/testextension.ini fi diff --git a/extensions/core/event/install.sh b/extensions/core/event/install.sh index dd4f2bde..c7cc9558 100755 --- a/extensions/core/event/install.sh +++ b/extensions/core/event/install.sh @@ -5,6 +5,6 @@ set -e #export EXTENSION="sockets" export PECL_EXTENSION="event" export DEV_DEPENDENCIES="libevent-dev libssl-dev" -export DEPENDENCIES="libevent-2.1-6 libevent-core-2.1-6 libevent-extra-2.1-6 libevent-openssl-2.1-6 libevent-pthreads-2.1-6 libssl1.1" +export DEPENDENCIES="libevent-2.1-7 libevent-core-2.1-7 libevent-extra-2.1-7 libevent-openssl-2.1-7 libevent-pthreads-2.1-7 libssl1.1" ../docker-install.sh diff --git a/orbit.yml b/orbit.yml index eb4a5bb1..d2160ceb 100644 --- a/orbit.yml +++ b/orbit.yml @@ -23,15 +23,15 @@ tasks: - orbit generate -f utils/Dockerfile.slim.blueprint -o Dockerfile.slim.cli -p "variant,cli" - orbit generate -f utils/Dockerfile.slim.blueprint -o Dockerfile.slim.fpm -p "variant,fpm" - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.apache -p "variant,apache;node_version," - - orbit generate -f utils/Dockerfile.node.blueprint -o Dockerfile.apache.node8 -p "variant,apache;node_version,8" - orbit generate -f utils/Dockerfile.node.blueprint -o Dockerfile.apache.node10 -p "variant,apache;node_version,10" - orbit generate -f utils/Dockerfile.node.blueprint -o Dockerfile.apache.node12 -p "variant,apache;node_version,12" + - orbit generate -f utils/Dockerfile.node.blueprint -o Dockerfile.apache.node14 -p "variant,apache;node_version,14" - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.cli -p "variant,cli;node_version," - - orbit generate -f utils/Dockerfile.node.blueprint -o Dockerfile.cli.node8 -p "variant,cli;node_version,8" - orbit generate -f utils/Dockerfile.node.blueprint -o Dockerfile.cli.node10 -p "variant,cli;node_version,10" - orbit generate -f utils/Dockerfile.node.blueprint -o Dockerfile.cli.node12 -p "variant,cli;node_version,12" + - orbit generate -f utils/Dockerfile.node.blueprint -o Dockerfile.cli.node14 -p "variant,cli;node_version,14" - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.fpm -p "variant,fpm;node_version," - - orbit generate -f utils/Dockerfile.node.blueprint -o Dockerfile.fpm.node8 -p "variant,fpm;node_version,8" - orbit generate -f utils/Dockerfile.node.blueprint -o Dockerfile.fpm.node10 -p "variant,fpm;node_version,10" - orbit generate -f utils/Dockerfile.node.blueprint -o Dockerfile.fpm.node12 -p "variant,fpm;node_version,12" - - orbit generate -f utils/README.blueprint.md -o README.md + - orbit generate -f utils/Dockerfile.node.blueprint -o Dockerfile.fpm.node14 -p "variant,fpm;node_version,14" + - orbit generate -f utils/README.blueprint.md -o README.md \ No newline at end of file diff --git a/utils/Dockerfile.slim.blueprint b/utils/Dockerfile.slim.blueprint index 4aa0fae1..702dcad5 100644 --- a/utils/Dockerfile.slim.blueprint +++ b/utils/Dockerfile.slim.blueprint @@ -1,6 +1,6 @@ {{- $variant := .Orbit.variant -}} -FROM ubuntu:bionic +FROM ubuntu:20.04 LABEL authors="Julien Neuhart , David Négrier " @@ -23,7 +23,7 @@ ENV PHP_VERSION=$PHP_VERSION # Install php an other packages RUN apt-get update \ && apt-get install -y --no-install-recommends gnupg \ - && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main" > /etc/apt/sources.list.d/ondrej-php.list \ + && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ondrej-php.list \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \ && apt-get update \ && apt-get install -y --no-install-recommends \ @@ -38,12 +38,12 @@ RUN apt-get update \ curl \ php${PHP_VERSION}-cli \ php${PHP_VERSION}-curl \ - php${PHP_VERSION}-json \ php${PHP_VERSION}-mbstring \ php${PHP_VERSION}-opcache \ php${PHP_VERSION}-readline \ php${PHP_VERSION}-xml \ php${PHP_VERSION}-zip \ + && if [ "${PHP_VERSION}" = "7.1" ] || [ "${PHP_VERSION}" = "7.2" ] || [ "${PHP_VERSION}" = "7.3" ] || [ "${PHP_VERSION}" = "7.4" ]; then apt-get install -y --no-install-recommends php${PHP_VERSION}-json; fi \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* @@ -88,12 +88,15 @@ RUN rm /etc/php/${PHP_VERSION}/cli/php.ini #ENV COMPOSER_ALLOW_SUPERUSER 1 -RUN curl -sS https://getcomposer.org/installer | php -- --1 --install-dir=/usr/local/bin --filename=real_composer &&\ - chmod +x /usr/local/bin/real_composer +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer &&\ + chmod +x /usr/local/bin/composer # TODO: utils.php in /usr/local/bin... bof! COPY utils/utils.php /usr/local/bin/utils.php -COPY utils/composer_proxy.php /usr/local/bin/composer +RUN mv /usr/bin/php /usr/bin/real_php +COPY utils/php_proxy.sh /usr/bin/php +COPY utils/check_php_env_var_changes.php /usr/local/bin/check_php_env_var_changes.php +COPY utils/php_env_var_cache.php /opt/php_env_var_cache.php COPY utils/generate_conf.php /usr/local/bin/generate_conf.php COPY utils/setup_extensions.php /usr/local/bin/setup_extensions.php @@ -131,16 +134,8 @@ ENV PHP_EXTENSION_CALENDAR=1 \ PHP_EXTENSION_XSL=1 \ PHP_EXTENSION_ZIP=1 -# |-------------------------------------------------------------------------- -# | prestissimo -# |-------------------------------------------------------------------------- -# | -# | Installs Prestissimo to improve Composer download performance. -# | - USER docker -RUN composer global require hirak/prestissimo && \ - composer global require bamarni/symfony-console-autocomplete && \ +RUN composer global require bamarni/symfony-console-autocomplete && \ rm -rf ~/.composer/cache USER root @@ -361,13 +356,12 @@ RUN ln -s /etc/php/${PHP_VERSION}/mods-available/generated_conf.ini /etc/php/${P sed -i 's/^group = www-data/;group = www-data/g' /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf && \ sed -i 's#listen = /run/php/php${PHP_VERSION}-fpm.sock#;listen = /run/php/php${PHP_VERSION}-fpm.sock#g' /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf && \ sed -i "s#pid = /run/php/php${PHP_VERSION}-fpm.pid#;pid = /run/php/php${PHP_VERSION}-fpm.pid#g" /etc/php/${PHP_VERSION}/fpm/php-fpm.conf && \ - if [ "$PHP_VERSION" = "7.1" ] || [ "$PHP_VERSION" = "7.2" ]; then \ + if [ "$PHP_VERSION" = "7.2" ]; then \ sed -i 's/^log_limit =/;log_limit =/g' /etc/php/${PHP_VERSION}/fpm/pool.d/docker.conf && \ sed -i 's/^decorate_workers_output =/;decorate_workers_output =/g' /etc/php/${PHP_VERSION}/fpm/pool.d/docker.conf; \ fi {{end}} - USER docker COPY utils/install_selected_extensions.php /usr/local/bin/install_selected_extensions.php diff --git a/utils/README.blueprint.md b/utils/README.blueprint.md index 4d4928f9..84ca3fe6 100644 --- a/utils/README.blueprint.md +++ b/utils/README.blueprint.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/thecodingmachine/docker-images-php.svg?branch=v3)](https://travis-ci.org/thecodingmachine/docker-images-php) +[![Build Status](https://travis-ci.org/thecodingmachine/docker-images-php.svg?branch=v4)](https://travis-ci.org/thecodingmachine/docker-images-php) # General purpose PHP images for Docker @@ -16,35 +16,35 @@ This repository contains a set of developer-friendly, general purpose PHP images {{ $image := .Orbit.Images }} ## Images -{{ $versions := list "7.4" "7.3" "7.2" "7.1" }} +{{ $versions := list "8.0" "7.4" "7.3" "7.2" }} | Name | PHP version | type |variant | NodeJS version | Size |-------------------------------------------------------------------------|------------------------------|------|--------|-----------------|------ -{{range $versions}}| [thecodingmachine/php:{{ . }}-v3-apache](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache) | `{{ . }}.x` | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-apache.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-apache) -| [thecodingmachine/php:{{ . }}-v3-apache-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node8) | `{{ . }}.x` | fat | apache | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-apache-node8.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-apache-node8) -| [thecodingmachine/php:{{ . }}-v3-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node10) | `{{ . }}.x` | fat | apache | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-apache-node10) -| [thecodingmachine/php:{{ . }}-v3-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.apache.node12) | `{{ . }}.x` | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-apache-node12) -| [thecodingmachine/php:{{ . }}-v3-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm) | `{{ . }}.x` | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-fpm) -| [thecodingmachine/php:{{ . }}-v3-fpm-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node8) | `{{ . }}.x` | fat | fpm | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-fpm-node8.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-fpm-node8) -| [thecodingmachine/php:{{ . }}-v3-fpm-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node10) | `{{ . }}.x` | fat | fpm | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-fpm-node10.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-fpm-node10) -| [thecodingmachine/php:{{ . }}-v3-fpm-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.fpm.node12) | `{{ . }}.x` | fat | fpm | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-fpm-node12.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-fpm-node12) -| [thecodingmachine/php:{{ . }}-v3-cli](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli) | `{{ . }}.x` | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-cli.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-cli) -| [thecodingmachine/php:{{ . }}-v3-cli-node8](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node8) | `{{ . }}.x` | fat | cli | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-cli-node8.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-cli-node8) -| [thecodingmachine/php:{{ . }}-v3-cli-node10](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node10) | `{{ . }}.x` | fat | cli | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-cli-node10.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-cli-node10) -| [thecodingmachine/php:{{ . }}-v3-cli-node12](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.cli.node12) | `{{ . }}.x` | fat | cli | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-cli-node12.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-cli-node12) -| [thecodingmachine/php:{{ . }}-v3-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.apache) | `{{ . }}.x` | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-slim-apache) -| [thecodingmachine/php:{{ . }}-v3-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.fpm) | `{{ . }}.x` | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-slim-fpm) -| [thecodingmachine/php:{{ . }}-v3-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v3/Dockerfile.slim.cli) | `{{ . }}.x` | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v3-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v3-slim-cli) +{{range $versions}}| [thecodingmachine/php:{{ . }}-v4-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache) | `{{ . }}.x` | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-apache.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-apache) +| [thecodingmachine/php:{{ . }}-v4-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node10) | `{{ . }}.x` | fat | apache | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-apache-node10) +| [thecodingmachine/php:{{ . }}-v4-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node12) | `{{ . }}.x` | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-apache-node12) +| [thecodingmachine/php:{{ . }}-v4-apache-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node14) | `{{ . }}.x` | fat | apache | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-apache-node14.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-apache-node14) +| [thecodingmachine/php:{{ . }}-v4-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm) | `{{ . }}.x` | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-fpm) +| [thecodingmachine/php:{{ . }}-v4-fpm-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node10) | `{{ . }}.x` | fat | fpm | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-fpm-node10.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-fpm-node10) +| [thecodingmachine/php:{{ . }}-v4-fpm-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node12) | `{{ . }}.x` | fat | fpm | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-fpm-node12.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-fpm-node12) +| [thecodingmachine/php:{{ . }}-v4-fpm-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node14) | `{{ . }}.x` | fat | fpm | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-fpm-node14.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-fpm-node14) +| [thecodingmachine/php:{{ . }}-v4-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli) | `{{ . }}.x` | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-cli.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-cli) +| [thecodingmachine/php:{{ . }}-v4-cli-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node10) | `{{ . }}.x` | fat | cli | `10.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-cli-node10.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-cli-node10) +| [thecodingmachine/php:{{ . }}-v4-cli-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node12) | `{{ . }}.x` | fat | cli | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-cli-node12.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-cli-node12) +| [thecodingmachine/php:{{ . }}-v4-cli-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node14) | `{{ . }}.x` | fat | cli | `8.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-cli-node14.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-cli-node14) +| [thecodingmachine/php:{{ . }}-v4-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.apache) | `{{ . }}.x` | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-slim-apache) +| [thecodingmachine/php:{{ . }}-v4-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.fpm) | `{{ . }}.x` | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-slim-fpm) +| [thecodingmachine/php:{{ . }}-v4-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.cli) | `{{ . }}.x` | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ . }}-v4-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:{{ . }}-v4-slim-cli) {{end}} -Note: we do not tag patch releases of PHP, only minor versions. You will find one image for PHP 7.1, one for PHP 7.2, -but no tagged image for PHP 7.1.12. This is because we believe you have no valid reason to ask explicitly for 7.1.12. -When 7.1.13 is out, you certainly want to upgrade automatically to this patch release since patch releases contain only bugfixes. -Images are automatically updated when a new patch version of PHP is released, so the PHP 7.1 image will always contain -the most up-to-date version of the PHP 7.1.x branch. If you want to automatically update your images on your production -environment, you can use tools like [watchtower](https://github.com/containrrr/watchtower) that will monitor new versions of -the images and update your environment on the fly. +Note: we also tag patch releases of PHP versions. So you can specify a specific patch release using thecodingmachine/php:**8.0.2**-v4-cli for instance. +However, unless you have a **very specific need** (for instance if the latest patch release of PHP introduced regressions), believe you have no valid reason to ask explicitly for 8.0.2 for instance. +When 8.0.3 is out, you certainly want to upgrade automatically to this patch release since patch releases contain only bugfixes. +Also, we automatically rebuild X.Y images every week, but only the latest X.Y.Z patch release gets a rebuild. The other patch releases are frozen in time and will contain bugs and security issues. So use those with great care. + +[Major].[minor] images are automatically updated when a new patch version of PHP is released, so the PHP 7.4 image will always contain +the most up-to-date version of the PHP 7.4.x branch. ## Usage @@ -53,26 +53,26 @@ These images are based on the [official PHP image](https://hub.docker.com/_/php/ Example with CLI: ```bash -$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app thecodingmachine/php:{{ $image.php_version }}-v3-cli php your-script.php +$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app thecodingmachine/php:{{ $image.php_version }}-v4-cli php your-script.php ``` Example with Apache: ```bash -$ docker run -p 80:80 --rm --name my-apache-php-app -v "$PWD":/var/www/html thecodingmachine/php:{{ $image.php_version }}-v3-apache +$ docker run -p 80:80 --rm --name my-apache-php-app -v "$PWD":/var/www/html thecodingmachine/php:{{ $image.php_version }}-v4-apache ``` Example with PHP-FPM: ```bash -$ docker run -p 9000:9000 --rm --name my-php-fpm -v "$PWD":/var/www/html thecodingmachine/php:{{ $image.php_version }}-v3-fpm +$ docker run -p 9000:9000 --rm --name my-php-fpm -v "$PWD":/var/www/html thecodingmachine/php:{{ $image.php_version }}-v4-fpm ``` Example with Apache + Node 8.x in a Dockerfile: **Dockerfile** ```Dockerfile -FROM thecodingmachine/php:{{ $image.php_version }}-v3-apache-node8 +FROM thecodingmachine/php:{{ $image.php_version }}-v4-apache-node14 COPY src/ /var/www/html/ RUN composer install @@ -107,6 +107,8 @@ Below is a list of extensions available in this image: - *mcrypt* is not available anymore in PHP 7.3+ - *weakref* is not compatible with PHP 7.3+ (but weak references were added to the PHP core in PHP 7.4) +- *sybase* extension is not available in v4 (use v3) +- *ev*, *event*, *gnupg*, *mongodb*, *rdkafka*, *swoole*, *uploadprogress*, *xmlrpc*, *blackfire* are not available in PHP 8.0+ ### Enabling/disabling extensions in the fat image @@ -118,7 +120,7 @@ For instance: version: '3' services: my_app: - image: thecodingmachine/php:{{ $image.php_version }}-v3-apache-node8 + image: thecodingmachine/php:{{ $image.php_version }}-v4-apache-node14 environment: # Enable the PostgreSQL extension PHP_EXTENSION_PGSQL: 1 @@ -138,7 +140,7 @@ If you are using the slim image, you can automatically compile the extensions us ```Dockerfile ARG PHP_EXTENSIONS="apcu mysqli pdo_mysql redis soap" -FROM thecodingmachine/php:{{ $image.php_version }}-v3-slim-apache +FROM thecodingmachine/php:{{ $image.php_version }}-v4-slim-apache # The build will automatically trigger the download and compilation # of the extensions (thanks to a ONBUILD hook in the slim image) ``` @@ -155,7 +157,7 @@ first FROM): # The PHP_EXTENSIONS ARG will apply to the "slim" image ARG PHP_EXTENSIONS="apcu mysqli opcache pdo_mysql zip soap" -FROM thecodingmachine/php:7.2-v3-apache-node10 AS builder +FROM thecodingmachine/php:7.2-v4-apache-node10 AS builder COPY --chown=docker:docker sources/web . RUN composer install &&\ @@ -163,7 +165,7 @@ RUN composer install &&\ yarn build # The slim image will automatically build the extensions from the list provided at the very top of the file. -FROM thecodingmachine/php:7.2-v3-slim-apache +FROM thecodingmachine/php:7.2-v4-slim-apache ENV APP_ENV=prod \ APACHE_DOCUMENT_ROOT=public/ @@ -191,7 +193,7 @@ You can override parameters in `php.ini` using the PHP_INI_XXX environment varia version: '3' services: my_app: - image: thecodingmachine/php:{{ $image.php_version }}-v3-apache-node8 + image: thecodingmachine/php:{{ $image.php_version }}-v4-apache-node14 environment: # set the parameter memory_limit=1g PHP_INI_MEMORY_LIMIT: 1g @@ -253,7 +255,7 @@ For instance: version: '3' services: my_app: - image: thecodingmachine/php:{{ $image.php_version }}-v3-apache-node8 + image: thecodingmachine/php:{{ $image.php_version }}-v4-apache-node14 environment: # Enable the DAV extension for Apache APACHE_EXTENSION_DAV: 1 @@ -280,23 +282,23 @@ To enable XDebug, you simply have to set the environment variable: PHP_EXTENSION_XDEBUG=1 ``` -If you enable XDebug, the image will do its best to configure the `xdebug.remote_host` to point back to your Docker host. +If you enable XDebug, the image will do its best to configure the `xdebug.client_host` to point back to your Docker host. Behind the scenes, the image will: -- set the parameter `xdebug.remote_enable=1` -- if you are using a Linux or Windows machine, the `xdebug.remote_host` IP will point to your Docker gateway -- if you are using a MaxOS machine, the `xdebug.remote_host` IP will point to [`docker.for.mac.localhost`](https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds) +- set the parameter `xdebug.mode=debug` +- if you are using a Linux machine, the `xdebug.client_host` IP will point to your Docker gateway +- if you are using a Windows or MaxOS machine, the `xdebug.client_host` IP will point to [`host.docker.internal`](https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds) or [`docker.for.mac.localhost`](https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds) ## NodeJS -The *fat* images come with a Node variant. You can use Node 8 or Node 10. If you need a Node 6 variant, [use thecodingmachine/php v1 images](https://github.com/thecodingmachine/docker-images-php/tree/7.2-v1). +The *fat* images come with a Node variant. You can use Node 10, 12 or 14. If you need a Node 8 variant, [use thecodingmachine/php v4 images](https://github.com/thecodingmachine/docker-images-php/tree/v4). If you need a Node 6 variant, [use thecodingmachine/php v1 images](https://github.com/thecodingmachine/docker-images-php/tree/7.2-v1). If you use the *slim* images, you can install a NodeJS version with a simple ARG during the build: ```Dockerfile -ARG NODE_VERSION=10 -FROM thecodingmachine/php:{{ $image.php_version }}-v3-slim-apache +ARG NODE_VERSION=14 +FROM thecodingmachine/php:{{ $image.php_version }}-v4-slim-apache # The build will automatically trigger the download of Node 10 # (thanks to a ONBUILD hook in the slim image) ``` @@ -349,7 +351,7 @@ This can be done easily: **Dockerfile** ``` -FROM thecodingmachine/php:{{ $image.php_version }}-v3-apache +FROM thecodingmachine/php:{{ $image.php_version }}-v4-apache # ... @@ -393,7 +395,7 @@ a single argument before the "FROM" clause in your Dockerfile: ```Dockerfile ARG INSTALL_CRON=1 -FROM thecodingmachine/php:{{ $image.php_version }}-v3-slim-apache +FROM thecodingmachine/php:{{ $image.php_version }}-v4-slim-apache # The build triggers automatically the installation of Cron ``` @@ -446,12 +448,12 @@ If such a file is mounted in the image, it will be executed on container startup ```bash docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp \ - -v $PWD/my-startup-script.sh:/etc/container/startup.sh thecodingmachine/php:{{ $image.php_version }}-v3-cli php your-script.php + -v $PWD/my-startup-script.sh:/etc/container/startup.sh thecodingmachine/php:{{ $image.php_version }}-v4-cli php your-script.php ``` ## Using the CLI variant -The CLI images (thecodingmachine/php:7.x-v3-cli) expect a command to be passed in parameter. +The CLI images (thecodingmachine/php:7.x-v4-cli) expect a command to be passed in parameter. You should override the Docker "command". Important! You should not override the Docker "entrypoint". @@ -459,7 +461,7 @@ Important! You should not override the Docker "entrypoint". **Usage in a Dockerfile:** ```Dockerfile -FROM thecodingmachine/php:{{ $image.php_version }}-v3-cli +FROM thecodingmachine/php:{{ $image.php_version }}-v4-cli CMD ["php", "myprogram.php", "some_param"] ``` @@ -471,7 +473,7 @@ CMD ["php", "myprogram.php", "some_param"] version: '3' services: my_app: - image: thecodingmachine/php:{{ $image.php_version }}-v3-cli + image: thecodingmachine/php:{{ $image.php_version }}-v4-cli command: php myprogram.php some_param ``` @@ -491,7 +493,7 @@ This option is the easiest way to go if you are using the image on a development version: '3' services: my_app: - image: thecodingmachine/php:{{ $image.php_version }}-v3-apache-node8 + image: thecodingmachine/php:{{ $image.php_version }}-v4-apache-node14 volumes: - ~/.ssh:/home/docker/.ssh ``` @@ -512,7 +514,7 @@ Now, let's write a Dockerfile. **Dockerfile** ```yml -FROM thecodingmachine/php:{{ $image.php_version }}-v3-apache +FROM thecodingmachine/php:{{ $image.php_version }}-v4-apache ARG SSH_PRIVATE_KEY ARG SSH_KNOWN_HOSTS @@ -550,7 +552,7 @@ kind: Pod spec: containers: - name: foobar - image: thecodingmachine/php:{{ $image.php_version }}-v3-apache + image: thecodingmachine/php:{{ $image.php_version }}-v4-apache securityContext: allowPrivilegeEscalation: true # never use "false" here. ``` @@ -572,7 +574,7 @@ Your `docker-compose.yml` file will typically look like this: version: '3.3' services: php: - image: thecodingmachine/php:{{ $image.php_version }}-v3-apache + image: thecodingmachine/php:{{ $image.php_version }}-v4-apache ports: - "80:80" environment: @@ -598,7 +600,7 @@ If for some reason, the container name is not "blackfire", you can customize the version: '3.3' services: php: - image: thecodingmachine/php:{{ $image.php_version }}-v3-apache + image: thecodingmachine/php:{{ $image.php_version }}-v4-apache environment: PHP_EXTENSION_BLACKFIRE: 1 BLACKFIRE_AGENT: myblackfire @@ -633,7 +635,7 @@ This command will generate all the files from the "blueprint" templates. You can then test your changes using the `build-and-test.sh` command: ```bash -PHP_VERSION={{ $image.php_version }} BRANCH=v3 VARIANT=apache ./build-and-test.sh +PHP_VERSION={{ $image.php_version }} BRANCH=v4 VARIANT=apache ./build-and-test.sh ``` ### Adding additional images diff --git a/utils/check_php_env_var_changes.php b/utils/check_php_env_var_changes.php new file mode 100644 index 00000000..96249fc1 --- /dev/null +++ b/utils/check_php_env_var_changes.php @@ -0,0 +1,35 @@ + $value) { + if (substr($key, 0, strlen('PHP_')) === 'PHP_') { + if (!isset($phpEnvVarCache[$key])) { + // The env var does not exist in the cache. + $shouldGenerateConfig = true; + } else if ($phpEnvVarCache[$key] !== $value) { + // The value has changed. + $shouldGenerateConfig = true; + } + + $phpEnvVar[$key] = $value; + } +} + +if ($shouldGenerateConfig === false) { + echo "0"; + exit(0); +} + +$cacheFileContent = ' /dev/null'); - passthru('php /usr/local/bin/setup_extensions.php | sudo bash'); -} - -array_shift($argv); - -$args = array_map(function(string $item) { return escapeshellarg($item); }, $argv); - -// Let's pass the command down to the real composer -passthru('real_composer '.implode(' ', $args), $exitCode); -exit($exitCode); diff --git a/utils/docker-entrypoint-as-root.sh b/utils/docker-entrypoint-as-root.sh index f8c6c9ea..960e9eb8 100755 --- a/utils/docker-entrypoint-as-root.sh +++ b/utils/docker-entrypoint-as-root.sh @@ -2,7 +2,7 @@ set -e -# Let's write a file saying the container is started (we are no longer in build mode, useful for composer_proxy.php) +# Let's write a file saying the container is started (we are no longer in build mode, useful for php_proxy.sh) touch /opt/container_started # Let's apply the requested php.ini file @@ -81,8 +81,8 @@ set +e chown $DOCKER_USER /proc/self/fd/{1,2} set -e -if [ -z "$XDEBUG_REMOTE_HOST" ]; then - export XDEBUG_REMOTE_HOST=`/sbin/ip route|awk '/default/ { print $3 }'` +if [ -z "$XDEBUG_CLIENT_HOST" ]; then + export XDEBUG_CLIENT_HOST=`/sbin/ip route|awk '/default/ { print $3 }'` set +e # On Windows and MacOS with Docker >= 18.03, check that host.docker.internal exists. it true, use this. @@ -92,7 +92,7 @@ if [ -z "$XDEBUG_REMOTE_HOST" ]; then # The host exists. DOCKER_HOST_INTERNAL=`host -t A host.docker.internal | awk '/has address/ { print $4 }'` if [ "$DOCKER_HOST_INTERNAL" != "127.0.0.1" ]; then - export XDEBUG_REMOTE_HOST=$DOCKER_HOST_INTERNAL + export XDEBUG_CLIENT_HOST=$DOCKER_HOST_INTERNAL export REMOTE_HOST_FOUND=1 fi fi @@ -106,7 +106,7 @@ if [ -z "$XDEBUG_REMOTE_HOST" ]; then # The host exists. DOCKER_FOR_MAC_REMOTE_HOST=`host -t A docker.for.mac.localhost | awk '/has address/ { print $4 }'` if [ "$DOCKER_FOR_MAC_REMOTE_HOST" != "127.0.0.1" ]; then - export XDEBUG_REMOTE_HOST=$DOCKER_FOR_MAC_REMOTE_HOST + export XDEBUG_CLIENT_HOST=$DOCKER_FOR_MAC_REMOTE_HOST fi fi fi @@ -116,12 +116,15 @@ fi unset DOCKER_FOR_MAC_REMOTE_HOST unset REMOTE_HOST_FOUND -php /usr/local/bin/generate_conf.php > /etc/php/${PHP_VERSION}/mods-available/generated_conf.ini -php /usr/local/bin/setup_extensions.php | sudo bash +sudo chown docker:docker /opt/php_env_var_cache.php +/usr/bin/real_php /usr/local/bin/check_php_env_var_changes.php &> /dev/null + +/usr/bin/real_php /usr/local/bin/generate_conf.php > /etc/php/${PHP_VERSION}/mods-available/generated_conf.ini +/usr/bin/real_php /usr/local/bin/setup_extensions.php | sudo bash # output on the logs can be done by writing on the "tini" PID. Useful for CRONTAB TINI_PID=`ps -e | grep tini | awk '{print $1;}'` -php /usr/local/bin/generate_cron.php $TINI_PID > /tmp/generated_crontab +/usr/bin/real_php /usr/local/bin/generate_cron.php $TINI_PID > /tmp/generated_crontab chmod 0644 /tmp/generated_crontab # If generated_crontab is not empty, start supercronic @@ -130,13 +133,13 @@ if [[ -s /tmp/generated_crontab ]]; then fi if [[ "$IMAGE_VARIANT" == "apache" ]]; then - php /usr/local/bin/enable_apache_mods.php | bash + /usr/bin/real_php /usr/local/bin/enable_apache_mods.php | bash fi if [ -e /etc/container/startup.sh ]; then sudo -E -u "#$DOCKER_USER_ID" /etc/container/startup.sh fi -sudo -E -u "#$DOCKER_USER_ID" sh -c "php /usr/local/bin/startup_commands.php | bash" +sudo -E -u "#$DOCKER_USER_ID" sh -c "/usr/bin/real_php /usr/local/bin/startup_commands.php | bash" if [[ "$APACHE_DOCUMENT_ROOT" == /* ]]; then export ABSOLUTE_APACHE_DOCUMENT_ROOT="$APACHE_DOCUMENT_ROOT" diff --git a/utils/generate_conf.php b/utils/generate_conf.php index ab5d4953..d5488422 100644 --- a/utils/generate_conf.php +++ b/utils/generate_conf.php @@ -26,8 +26,8 @@ if (enableExtension('xdebug')) { //echo "zend_extension=xdebug.so\n"; - echo "xdebug.remote_host=".getenv('XDEBUG_REMOTE_HOST')."\n"; - echo "xdebug.remote_enable=on\n"; + echo "xdebug.client_host=".getenv('XDEBUG_CLIENT_HOST')."\n"; + echo "xdebug.mode=debug\n"; //echo "xdebug.remote_autostart=off\n"; //echo "xdebug.remote_port=9000\n"; //echo "xdebug.remote_connect_back=0\n"; diff --git a/utils/php_env_var_cache.php b/utils/php_env_var_cache.php new file mode 100644 index 00000000..0b67a5fe --- /dev/null +++ b/utils/php_env_var_cache.php @@ -0,0 +1,3 @@ + /dev/null + /usr/bin/real_php /usr/local/bin/setup_extensions.php | sudo bash +fi + +/usr/bin/real_php "$@" diff --git a/utils/setup_extensions.php b/utils/setup_extensions.php index dfa8ca3e..1396f272 100755 --- a/utils/setup_extensions.php +++ b/utils/setup_extensions.php @@ -59,6 +59,12 @@ unset($toDisable['mysqlnd']); } +// curl is a dependency required for blackfire 8 (see https://blog.blackfire.io/php-8-support.html) +/*if (enableExtension('blackfire')) { + $toEnable['curl'] = 'curl'; + unset($toDisable['curl']); +}*/ + if ($toDisable) { echo 'phpdismod '.implode(' ', $toDisable)."\n"; }