Skip to content
Closed
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
46 changes: 46 additions & 0 deletions .github/workflows/pipes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Pipes

on:
pull_request:
branches:
- master
paths:
- 'bin/**'
- 'build/**'
- 'scripts/**'
- 'src/**'
types:
- labeled
- unlabeled
- opened
- synchronize
push:
branches:
- master
paths:
- 'bin/**'
- 'build/**'
- 'scripts/**'
- 'src/**'
workflow_dispatch:

jobs:
# build images and ensure no git diff
# run phpinfo and ensure correct version of xdebug is installed
build_and_verify:
name: Build and Verify
if: |
github.event_name == 'push'
|| github.event_name == 'workflow_dispatch'
|| (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify builds are correct
run: |
make clean
make generate
./scripts/git-has-changes.sh
- name: Build and verify CLI docker images
run: |
./scripts/build-and-verify-cli-images.sh mobtitude/php-xdebug
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/.idea
.*

!.gitignore

!.github/
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ Supported tags:
* mobtitude/php-xdebug:7.2-apache
* mobtitude/php-xdebug:7.2-cli
* mobtitude/php-xdebug:7.2-fpm

* mobtitude/php-xdebug:8.1-apache
* mobtitude/php-xdebug:8.1-cli
* mobtitude/php-xdebug:8.1-fpm
* mobtitude/php-xdebug:8.2-apache
* mobtitude/php-xdebug:8.2-cli
* mobtitude/php-xdebug:8.2-fpm
* mobtitude/php-xdebug:8.3-apache
* mobtitude/php-xdebug:8.3-cli
* mobtitude/php-xdebug:8.3-fpm

Build from source
-------------------
Expand Down Expand Up @@ -84,4 +92,4 @@ FAQ
Q: Why images don't have specific PHP version like `7.2.2` but only major and minor version `7.2`?

A: It is because images in this repo have always the newest possible patch version of PHP based on official Docker PHP images.
For example for `mobtitude/php-xdebug:7.2-apache` you can expect that it is always the newest PHP version available in official Docker Registry and it is automatically updated when official PHP Docker images are updated. The newest possible PHP version at the time of writing is 7.2.2, but will be automatically updated to 7.2.3 when official PHP Docker images are updated.
For example for `mobtitude/php-xdebug:7.2-apache` you can expect that it is always the newest PHP version available in official Docker Registry and it is automatically updated when official PHP Docker images are updated. The newest possible PHP version at the time of writing is 7.2.2, but will be automatically updated to 7.2.3 when official PHP Docker images are updated.
1 change: 1 addition & 0 deletions bin/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ if [ "${#build_failed[@]}" -gt 0 ]; then
for img in "${build_failed[@]}"; do
echo "${text_red}* ${img}${text_normal}"
done
exit 1
fi
12 changes: 5 additions & 7 deletions bin/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
#

# PHP Versions that will be generated
#php_versions=( "8.0" "7.4" "7.2" "7.1" "7.0" "5.6")
php_versions=( "8.1" "8.0" "7.4" "7.2" )
php_versions=( "8.3" "8.2" "8.1" "8.0" "7.4" )

# PHP variants that will be generated for each PHP version
# final source image will be generated as follow: php:7.2-cli, php:7-2-apache and php:7.2-fpm
Expand All @@ -16,13 +15,11 @@ php_docker_suffix=( "cli" "apache" "fpm" )
# PHP_VERSION => XDEBUG_VERSION
declare -A xdebug_versions
xdebug_versions=(
["8.3"]="xdebug-3.3.1"
["8.2"]="xdebug-3.3.1"
["8.1"]="xdebug-3.1.3"
["8.0"]="xdebug-3.1.3"
["7.4"]="xdebug-2.9.1"
["7.2"]="xdebug-2.6.0"
["7.1"]="xdebug-2.6.0"
["7.0"]="xdebug-2.6.0"
["5.6"]="xdebug-2.5.5"
)


Expand All @@ -38,9 +35,10 @@ for php_version in "${php_versions[@]}"; do

base_image="php:${php_version}-${php_suffix}"
xdebug_version="${xdebug_versions[${php_version}]}"
xdebug_major_version=`echo "${xdebug_version}" | sed 's/xdebug-\([1-9][0-9]\{0,\}\)\..*/\1/'`

mkdir -p "${target_dir}"
cp ./src/xdebug.ini "${target_dir}/xdebug.ini"
cp "./src/xdebug-${xdebug_major_version}.ini" "${target_dir}/xdebug.ini"

# shellcheck disable=SC2002
cat ./src/Dockerfile \
Expand Down
13 changes: 0 additions & 13 deletions build/7.2-apache/xdebug.ini

This file was deleted.

13 changes: 0 additions & 13 deletions build/7.2-cli/xdebug.ini

This file was deleted.

2 changes: 1 addition & 1 deletion build/7.4-apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
&& pecl install xdebug-2.9.1 \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
2 changes: 1 addition & 1 deletion build/7.4-apache/xdebug.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"

xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_port=9000
2 changes: 1 addition & 1 deletion build/7.4-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
&& pecl install xdebug-2.9.1 \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
2 changes: 1 addition & 1 deletion build/7.4-cli/xdebug.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"

xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_port=9000
2 changes: 1 addition & 1 deletion build/7.4-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
&& pecl install xdebug-2.9.1 \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
2 changes: 1 addition & 1 deletion build/7.4-fpm/xdebug.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"

xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_port=9000
2 changes: 1 addition & 1 deletion build/8.0-apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
&& pecl install xdebug-3.1.3 \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
12 changes: 6 additions & 6 deletions build/8.0-apache/xdebug.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
zend_extension=xdebug.so

xdebug.cli_color=1
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.trigger_value=StartXDebug

xdebug.profiler_output_dir="/tmp"
xdebug.output_dir="/tmp"
xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"

xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.discover_client_host=true
xdebug.client_port=9003
2 changes: 1 addition & 1 deletion build/8.0-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
&& pecl install xdebug-3.1.3 \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
12 changes: 6 additions & 6 deletions build/8.0-cli/xdebug.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
zend_extension=xdebug.so

xdebug.cli_color=1
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.trigger_value=StartXDebug

xdebug.profiler_output_dir="/tmp"
xdebug.output_dir="/tmp"
xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"

xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.discover_client_host=true
xdebug.client_port=9003
2 changes: 1 addition & 1 deletion build/8.0-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
&& pecl install xdebug-3.1.3 \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
12 changes: 6 additions & 6 deletions build/8.0-fpm/xdebug.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
zend_extension=xdebug.so

xdebug.cli_color=1
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.trigger_value=StartXDebug

xdebug.profiler_output_dir="/tmp"
xdebug.output_dir="/tmp"
xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"

xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.discover_client_host=true
xdebug.client_port=9003
2 changes: 1 addition & 1 deletion build/8.1-apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
&& pecl install xdebug-3.1.3 \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
12 changes: 6 additions & 6 deletions build/8.1-apache/xdebug.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
zend_extension=xdebug.so

xdebug.cli_color=1
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.trigger_value=StartXDebug

xdebug.profiler_output_dir="/tmp"
xdebug.output_dir="/tmp"
xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"

xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.discover_client_host=true
xdebug.client_port=9003
2 changes: 1 addition & 1 deletion build/8.1-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
&& pecl install xdebug-3.1.3 \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
12 changes: 6 additions & 6 deletions build/8.1-cli/xdebug.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
zend_extension=xdebug.so

xdebug.cli_color=1
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.trigger_value=StartXDebug

xdebug.profiler_output_dir="/tmp"
xdebug.output_dir="/tmp"
xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"

xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.discover_client_host=true
xdebug.client_port=9003
2 changes: 1 addition & 1 deletion build/8.1-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ RUN pecl channel-update pecl.php.net \
&& pecl install xdebug-3.1.3 \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
12 changes: 6 additions & 6 deletions build/8.1-fpm/xdebug.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
zend_extension=xdebug.so

xdebug.cli_color=1
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.trigger_value=StartXDebug

xdebug.profiler_output_dir="/tmp"
xdebug.output_dir="/tmp"
xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"

xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.discover_client_host=true
xdebug.client_port=9003
19 changes: 19 additions & 0 deletions build/8.2-apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM php:8.2-apache
MAINTAINER Przemek Szalko <przemek@mobtitude.com>

# php intl extension
RUN apt-get update \
&& apt-get install -y libicu-dev \
&& docker-php-ext-install intl \
&& docker-php-ext-install pdo_mysql \
&& docker-php-source delete \
&& apt-get remove -y libicu-dev \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN pecl channel-update pecl.php.net \
&& pecl install xdebug-3.3.1 \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
13 changes: 13 additions & 0 deletions build/8.2-apache/xdebug.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[xdebug]
zend_extension=xdebug.so

xdebug.cli_color=1
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.trigger_value=StartXDebug

xdebug.output_dir="/tmp"
xdebug.profiler_output_name="cachegrind.out.%H.%t.%p"

xdebug.discover_client_host=true
xdebug.client_port=9003
Loading