mirror of
https://github.com/chialab/docker-php.git
synced 2026-11-06 12:40:34 -04:00
Merge pull request #138 from chialab/fix-build
Fix builds of old PHP images
This commit is contained in:
@@ -12,6 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
if: ${{ github.event_name != 'pull_request' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [ '5.6' ]
|
||||
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
|
||||
|
||||
@@ -12,6 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [ '7.0', '7.1', '7.2', '7.3', '7.4' ]
|
||||
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
|
||||
|
||||
@@ -12,6 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
|
||||
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
|
||||
|
||||
@@ -12,6 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [ '5.6' ]
|
||||
flavor: [ '', '-apache', '-fpm' ]
|
||||
|
||||
@@ -12,6 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [ 'latest', 'alpine' ]
|
||||
steps:
|
||||
|
||||
@@ -15,6 +15,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
if: ${{ !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [ '5.6' ]
|
||||
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
|
||||
|
||||
@@ -15,6 +15,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
if: ${{ !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [ '7.0', '7.1', '7.2', '7.3', '7.4' ]
|
||||
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
|
||||
|
||||
@@ -15,6 +15,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
|
||||
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
|
||||
|
||||
@@ -15,6 +15,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
if: ${{ !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [ '5.6' ]
|
||||
flavor: [ '', '-apache', '-fpm' ]
|
||||
|
||||
@@ -15,6 +15,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [ 'latest', 'alpine' ]
|
||||
services:
|
||||
|
||||
+9
-4
@@ -18,7 +18,12 @@ ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/do
|
||||
|
||||
RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
# PEAR < 1.10.18 can't read pecl.php.net responses anymore.
|
||||
RUN pear upgrade --force https://pear.php.net/get/PEAR-1.10.18.tgz
|
||||
|
||||
# retry: PECL sometimes replies "No releases available" on CI runners.
|
||||
RUN retry() { for i in 1 2 3; do "$@" && return; sleep 10; done; return 1; }; \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
|
||||
curl \
|
||||
git \
|
||||
@@ -57,10 +62,10 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
# other extensions. Installing amqp on its own so that install-php-extensions
|
||||
# purges libssl1.0-dev before libssl-dev is installed for the rest.
|
||||
&& if [ "${PHP_VERSION%%.*}" = "7" ]; then \
|
||||
install-php-extensions amqp \
|
||||
&& install-php-extensions $(echo "$PHP_EXTENSIONS" | sed 's/amqp//'); \
|
||||
retry install-php-extensions amqp \
|
||||
&& retry install-php-extensions $(echo "$PHP_EXTENSIONS" | sed 's/amqp//'); \
|
||||
else \
|
||||
install-php-extensions $PHP_EXTENSIONS; \
|
||||
retry install-php-extensions $PHP_EXTENSIONS; \
|
||||
fi \
|
||||
&& if command -v a2enmod; then a2enmod rewrite; fi
|
||||
|
||||
|
||||
+7
-2
@@ -6,7 +6,12 @@ LABEL maintainer="dev@chialab.io"
|
||||
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
|
||||
RUN apk add --no-cache \
|
||||
# PEAR < 1.10.18 can't read pecl.php.net responses anymore.
|
||||
RUN pear upgrade --force https://pear.php.net/get/PEAR-1.10.18.tgz
|
||||
|
||||
# retry: PECL sometimes replies "No releases available" on CI runners.
|
||||
RUN retry() { for i in 1 2 3; do "$@" && return; sleep 10; done; return 1; }; \
|
||||
apk add --no-cache \
|
||||
coreutils \
|
||||
curl \
|
||||
git \
|
||||
@@ -40,7 +45,7 @@ RUN apk add --no-cache \
|
||||
5.6.*) PHP_EXTENSIONS="$PHP_EXTENSIONS mcrypt mysql";; \
|
||||
7.0.*|7.1.*) PHP_EXTENSIONS="$PHP_EXTENSIONS mcrypt";; \
|
||||
esac \
|
||||
&& install-php-extensions $PHP_EXTENSIONS \
|
||||
&& retry install-php-extensions $PHP_EXTENSIONS \
|
||||
&& if command -v a2enmod; then a2enmod rewrite; fi
|
||||
|
||||
# Install Composer.
|
||||
|
||||
@@ -62,7 +62,7 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
|
||||
ENV GPG_KEYS 0BD78B5F97500D450838F95DFE857D9A90D90EC1 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3
|
||||
|
||||
ENV PHP_VERSION 5.6.40
|
||||
ENV PHP_URL="https://secure.php.net/get/php-5.6.40.tar.xz/from/this/mirror" PHP_ASC_URL="https://secure.php.net/get/php-5.6.40.tar.xz.asc/from/this/mirror"
|
||||
ENV PHP_URL="https://www.php.net/distributions/php-5.6.40.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-5.6.40.tar.xz.asc"
|
||||
ENV PHP_SHA256="1369a51eee3995d7fbd1c5342e5cc917760e276d561595b6052b21ace2656d1c" PHP_MD5=""
|
||||
|
||||
RUN set -xe; \
|
||||
@@ -211,7 +211,12 @@ ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/do
|
||||
|
||||
RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
# PEAR < 1.10.18 can't read pecl.php.net responses anymore.
|
||||
RUN pear upgrade --force https://pear.php.net/get/PEAR-1.10.18.tgz
|
||||
|
||||
# retry: PECL sometimes replies "No releases available" on CI runners.
|
||||
RUN retry() { for i in 1 2 3; do "$@" && return; sleep 10; done; return 1; }; \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
|
||||
curl \
|
||||
git \
|
||||
@@ -243,7 +248,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
xsl \
|
||||
zip \
|
||||
" \
|
||||
&& install-php-extensions $PHP_EXTENSIONS
|
||||
&& retry install-php-extensions $PHP_EXTENSIONS
|
||||
|
||||
# Install Composer.
|
||||
ENV PATH=$PATH:/root/composer/vendor/bin \
|
||||
|
||||
@@ -122,7 +122,7 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
|
||||
ENV GPG_KEYS 0BD78B5F97500D450838F95DFE857D9A90D90EC1 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3
|
||||
|
||||
ENV PHP_VERSION 5.6.40
|
||||
ENV PHP_URL="https://secure.php.net/get/php-5.6.40.tar.xz/from/this/mirror" PHP_ASC_URL="https://secure.php.net/get/php-5.6.40.tar.xz.asc/from/this/mirror"
|
||||
ENV PHP_URL="https://www.php.net/distributions/php-5.6.40.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-5.6.40.tar.xz.asc"
|
||||
ENV PHP_SHA256="1369a51eee3995d7fbd1c5342e5cc917760e276d561595b6052b21ace2656d1c" PHP_MD5=""
|
||||
|
||||
RUN set -xe; \
|
||||
@@ -275,7 +275,12 @@ ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/do
|
||||
|
||||
RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
# PEAR < 1.10.18 can't read pecl.php.net responses anymore.
|
||||
RUN pear upgrade --force https://pear.php.net/get/PEAR-1.10.18.tgz
|
||||
|
||||
# retry: PECL sometimes replies "No releases available" on CI runners.
|
||||
RUN retry() { for i in 1 2 3; do "$@" && return; sleep 10; done; return 1; }; \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
|
||||
curl \
|
||||
git \
|
||||
@@ -307,7 +312,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
xsl \
|
||||
zip \
|
||||
" \
|
||||
&& install-php-extensions $PHP_EXTENSIONS \
|
||||
&& retry install-php-extensions $PHP_EXTENSIONS \
|
||||
&& if command -v a2enmod; then a2enmod rewrite; fi
|
||||
|
||||
# Install Composer.
|
||||
|
||||
@@ -63,7 +63,7 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
|
||||
ENV GPG_KEYS 0BD78B5F97500D450838F95DFE857D9A90D90EC1 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3
|
||||
|
||||
ENV PHP_VERSION 5.6.40
|
||||
ENV PHP_URL="https://secure.php.net/get/php-5.6.40.tar.xz/from/this/mirror" PHP_ASC_URL="https://secure.php.net/get/php-5.6.40.tar.xz.asc/from/this/mirror"
|
||||
ENV PHP_URL="https://www.php.net/distributions/php-5.6.40.tar.xz" PHP_ASC_URL="https://www.php.net/distributions/php-5.6.40.tar.xz.asc"
|
||||
ENV PHP_SHA256="1369a51eee3995d7fbd1c5342e5cc917760e276d561595b6052b21ace2656d1c" PHP_MD5=""
|
||||
|
||||
RUN set -xe; \
|
||||
@@ -251,7 +251,12 @@ ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/do
|
||||
|
||||
RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
# PEAR < 1.10.18 can't read pecl.php.net responses anymore.
|
||||
RUN pear upgrade --force https://pear.php.net/get/PEAR-1.10.18.tgz
|
||||
|
||||
# retry: PECL sometimes replies "No releases available" on CI runners.
|
||||
RUN retry() { for i in 1 2 3; do "$@" && return; sleep 10; done; return 1; }; \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
|
||||
curl \
|
||||
git \
|
||||
@@ -283,7 +288,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
xsl \
|
||||
zip \
|
||||
" \
|
||||
&& install-php-extensions $PHP_EXTENSIONS
|
||||
&& retry install-php-extensions $PHP_EXTENSIONS
|
||||
|
||||
# Install Composer.
|
||||
ENV PATH=$PATH:/root/composer/vendor/bin \
|
||||
|
||||
+3
-1
@@ -3,4 +3,6 @@ FROM ${BASE_IMAGE}
|
||||
LABEL maintainer="dev@chialab.io"
|
||||
|
||||
# Install XDebug.
|
||||
RUN install-php-extensions xdebug
|
||||
# retry: PECL sometimes replies "No releases available" on CI runners.
|
||||
RUN retry() { for i in 1 2 3; do "$@" && return; sleep 10; done; return 1; }; \
|
||||
retry install-php-extensions xdebug
|
||||
|
||||
+5
-3
@@ -2,8 +2,10 @@ ARG BASE_IMAGE=chialab/php:latest
|
||||
FROM ${BASE_IMAGE}
|
||||
LABEL maintainer="dev@chialab.io"
|
||||
|
||||
RUN if [ "$(echo "$PHP_VERSION" | cut -d. -f1,2)" = "8.0" ]; then \
|
||||
install-php-extensions protobuf opentelemetry-php/ext-opentelemetry@1.1.3; \
|
||||
# retry: PECL sometimes replies "No releases available" on CI runners.
|
||||
RUN retry() { for i in 1 2 3; do "$@" && return; sleep 10; done; return 1; }; \
|
||||
if [ "$(echo "$PHP_VERSION" | cut -d. -f1,2)" = "8.0" ]; then \
|
||||
retry install-php-extensions protobuf opentelemetry-php/ext-opentelemetry@1.1.3; \
|
||||
else \
|
||||
install-php-extensions protobuf opentelemetry-php/ext-opentelemetry@1.3.1; \
|
||||
retry install-php-extensions protobuf opentelemetry-php/ext-opentelemetry@1.3.1; \
|
||||
fi
|
||||
|
||||
+3
-1
@@ -3,4 +3,6 @@ FROM ${BASE_IMAGE}
|
||||
LABEL maintainer="dev@chialab.io"
|
||||
|
||||
# Install PCOV.
|
||||
RUN install-php-extensions pcov
|
||||
# retry: PECL sometimes replies "No releases available" on CI runners.
|
||||
RUN retry() { for i in 1 2 3; do "$@" && return; sleep 10; done; return 1; }; \
|
||||
retry install-php-extensions pcov
|
||||
|
||||
+3
-1
@@ -3,4 +3,6 @@ FROM ${BASE_IMAGE}
|
||||
LABEL maintainer="dev@chialab.io"
|
||||
|
||||
# Install XHProf.
|
||||
RUN install-php-extensions xhprof
|
||||
# retry: PECL sometimes replies "No releases available" on CI runners.
|
||||
RUN retry() { for i in 1 2 3; do "$@" && return; sleep 10; done; return 1; }; \
|
||||
retry install-php-extensions xhprof
|
||||
|
||||
Reference in New Issue
Block a user