Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Build Versioned Images

on:
workflow_dispatch:
pull_request:
paths:
- generator
- templates/debian.php
- '8.*/Dockerfile'
- .github/workflows/debian.yml
push:
branches:
- master
Expand All @@ -11,9 +17,9 @@ jobs:
if: ${{ github.repository == 'swoole/php-docker' }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3', '8.4', '8.5', '8.1-zts', '8.2-zts', '8.3-zts', '8.4-zts', '8.5-zts']
php: ['8.2', '8.3', '8.4', '8.5', '8.2-zts', '8.3-zts', '8.4-zts', '8.5-zts']

name: PHP-${{ matrix.php }}

Expand All @@ -25,25 +31,32 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set output parameters
id: params
run: |
echo "::set-output name=full_names::phpswoole/php:${{ matrix.php }}"

- name: Build and push Docker image phpswoole/php:${{ matrix.php }}
id: docker_build
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.php }}/Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.params.outputs.full_names }}
push: ${{ github.event_name != 'pull_request' }}
load: true
tags: |
phpswoole/php:${{ matrix.php }}
phpswoole/php:${{ matrix.php }}-trixie

- name: Verify Debian and libcurl versions
run: |
docker run --rm phpswoole/php:${{ matrix.php }}-trixie sh -ec '
. /etc/os-release
test "$VERSION_CODENAME" = trixie
php -r '\''$curl = curl_version(); echo "libcurl: {$curl["version"]}\n"; exit(version_compare($curl["version"], "8.0.0", "<") || !($curl["features"] & CURL_VERSION_HTTP2) ? 1 : 0);'\''
'

- name: Image digest of phpswoole/php:${{ matrix.php }}
run: echo ${{ steps.docker_build.outputs.digest }}
2 changes: 1 addition & 1 deletion 8.1-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
2 changes: 1 addition & 1 deletion 8.1-zts-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
52 changes: 0 additions & 52 deletions 8.1-zts/Dockerfile

This file was deleted.

52 changes: 0 additions & 52 deletions 8.1/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion 8.2-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
2 changes: 1 addition & 1 deletion 8.2-zts-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
9 changes: 4 additions & 5 deletions 8.2-zts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
FROM php:8.2-zts-bookworm
FROM php:8.2-zts-trixie
LABEL maintainer="Swoole Team <team@swoole.com>"

RUN apt update -y

RUN apt install -y \
procps \
libfreetype6-dev \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev \
openssl \
libssh-dev \
libpcre3 \
libpcre3-dev \
libpcre2-dev \
libonig-dev \
libcurl4-openssl-dev \
libc-ares-dev \
Expand All @@ -37,7 +36,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
9 changes: 4 additions & 5 deletions 8.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
FROM php:8.2-bookworm
FROM php:8.2-trixie
LABEL maintainer="Swoole Team <team@swoole.com>"

RUN apt update -y

RUN apt install -y \
procps \
libfreetype6-dev \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev \
openssl \
libssh-dev \
libpcre3 \
libpcre3-dev \
libpcre2-dev \
libonig-dev \
libcurl4-openssl-dev \
libc-ares-dev \
Expand All @@ -37,7 +36,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
2 changes: 1 addition & 1 deletion 8.3-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
2 changes: 1 addition & 1 deletion 8.3-zts-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
9 changes: 4 additions & 5 deletions 8.3-zts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
FROM php:8.3-zts-bookworm
FROM php:8.3-zts-trixie
LABEL maintainer="Swoole Team <team@swoole.com>"

RUN apt update -y

RUN apt install -y \
procps \
libfreetype6-dev \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev \
openssl \
libssh-dev \
libpcre3 \
libpcre3-dev \
libpcre2-dev \
libonig-dev \
libcurl4-openssl-dev \
libc-ares-dev \
Expand All @@ -37,7 +36,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
9 changes: 4 additions & 5 deletions 8.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
FROM php:8.3-bookworm
FROM php:8.3-trixie
LABEL maintainer="Swoole Team <team@swoole.com>"

RUN apt update -y

RUN apt install -y \
procps \
libfreetype6-dev \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev \
openssl \
libssh-dev \
libpcre3 \
libpcre3-dev \
libpcre2-dev \
libonig-dev \
libcurl4-openssl-dev \
libc-ares-dev \
Expand All @@ -37,7 +36,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
2 changes: 1 addition & 1 deletion 8.4-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
2 changes: 1 addition & 1 deletion 8.4-zts-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
9 changes: 4 additions & 5 deletions 8.4-zts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
FROM php:8.4-zts-bookworm
FROM php:8.4-zts-trixie
LABEL maintainer="Swoole Team <team@swoole.com>"

RUN apt update -y

RUN apt install -y \
procps \
libfreetype6-dev \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev \
openssl \
libssh-dev \
libpcre3 \
libpcre3-dev \
libpcre2-dev \
libonig-dev \
libcurl4-openssl-dev \
libc-ares-dev \
Expand All @@ -37,7 +36,7 @@ RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install \
pecl install redis && docker-php-ext-enable redis

# install composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
composer self-update --clean-backups
Expand Down
Loading
Loading