Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Integrate xdebug; #1

Closed
wants to merge 1 commit into from
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
39 changes: 28 additions & 11 deletions php80.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM php:8.0.30-fpm

# Update and install dependencies
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
Expand All @@ -10,31 +11,38 @@ RUN apt-get update && apt-get install -y \
libzip-dev \
libonig-dev \
graphviz \
libicu-dev \
ghostscript \
supervisor \
dos2unix mc htop nano wget nginx \
dos2unix \
mc \
htop \
nano \
wget \
nginx \
git \

# Nodejs
# Node.js
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g yarn \

# GD
# GD extension
&& docker-php-ext-configure gd \
--with-freetype=/usr/include/ \
--with-jpeg=/usr/include/ \
--with-freetype=/usr/include/ \
&& docker-php-ext-install gd \

# Swoole
# Swoole extension
&& pecl install swoole \
&& docker-php-ext-enable swoole \

# Redis
# Redis extension
&& pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \

# Other PHP extensions
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install zip \
&& docker-php-ext-install intl \
Expand All @@ -43,7 +51,7 @@ RUN apt-get update && apt-get install -y \
&& docker-php-ext-install pcntl \
&& docker-php-source delete \

# Postgresql
# PostgreSQL
&& apt-get install -y libpq-dev \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo pdo_pgsql pgsql \
Expand All @@ -52,10 +60,19 @@ RUN apt-get update && apt-get install -y \
&& curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin --filename=composer \

# Install Xdebug
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& echo "zend_extension=xdebug.so" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_port=9003" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \

# Aliases
&& echo "\
alias 'p=/var/www/app/vendor/bin/phpunit' \n\
alias 'pf=/var/www/app/vendor/bin/phpunit --filter' \n\
alias 'p=php artisan test' \n\
alias 'pf=php artisan test --filter=' \n\
" >> ~/.bashrc

WORKDIR /var/www/app/
Expand Down
40 changes: 28 additions & 12 deletions php81.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM php:8.1.27-fpm
FROM php:8.1.29-fpm

# Update and install dependencies
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
Expand All @@ -13,29 +14,35 @@ RUN apt-get update && apt-get install -y \
libicu-dev \
ghostscript \
supervisor \
dos2unix mc htop nano wget nginx \
dos2unix \
mc \
htop \
nano \
wget \
nginx \
git \

# Nodejs
# Node.js
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g yarn \

# GD
# GD extension
&& docker-php-ext-configure gd \
--with-freetype=/usr/include/ \
--with-jpeg=/usr/include/ \
--with-freetype=/usr/include/ \
&& docker-php-ext-install gd \

# Swoole
# Swoole extension
&& pecl install swoole \
&& docker-php-ext-enable swoole \

# Redis
# Redis extension
&& pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \

# Other PHP extensions
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install zip \
&& docker-php-ext-install intl \
Expand All @@ -44,7 +51,7 @@ RUN apt-get update && apt-get install -y \
&& docker-php-ext-install pcntl \
&& docker-php-source delete \

# Postgresql
# PostgreSQL
&& apt-get install -y libpq-dev \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo pdo_pgsql pgsql \
Expand All @@ -53,10 +60,19 @@ RUN apt-get update && apt-get install -y \
&& curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin --filename=composer \

# Install Xdebug
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& echo "zend_extension=xdebug.so" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_port=9003" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \

# Aliases
&& echo "\
alias 'p=/var/www/app/vendor/bin/phpunit' \n\
alias 'pf=/var/www/app/vendor/bin/phpunit --filter' \n\
alias 'p=php artisan test' \n\
alias 'pf=php artisan test --filter=' \n\
" >> ~/.bashrc

WORKDIR /var/www/app/
Expand Down
40 changes: 28 additions & 12 deletions php82.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM php:8.2.15-fpm
FROM php:8.2.20-fpm

# Update and install dependencies
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
Expand All @@ -13,29 +14,35 @@ RUN apt-get update && apt-get install -y \
libicu-dev \
ghostscript \
supervisor \
dos2unix mc htop nano wget nginx \
dos2unix \
mc \
htop \
nano \
wget \
nginx \
git \

# Nodejs
# Node.js
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g yarn \

# GD
# GD extension
&& docker-php-ext-configure gd \
--with-freetype=/usr/include/ \
--with-jpeg=/usr/include/ \
--with-freetype=/usr/include/ \
&& docker-php-ext-install gd \

# Swoole
# Swoole extension
&& pecl install swoole \
&& docker-php-ext-enable swoole \

# Redis
# Redis extension
&& pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \

# Other PHP extensions
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install zip \
&& docker-php-ext-install intl \
Expand All @@ -44,7 +51,7 @@ RUN apt-get update && apt-get install -y \
&& docker-php-ext-install pcntl \
&& docker-php-source delete \

# Postgresql
# PostgreSQL
&& apt-get install -y libpq-dev \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo pdo_pgsql pgsql \
Expand All @@ -53,10 +60,19 @@ RUN apt-get update && apt-get install -y \
&& curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin --filename=composer \

# Install Xdebug
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& echo "zend_extension=xdebug.so" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_port=9003" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \

# Aliases
&& echo "\
alias 'p=/var/www/app/vendor/bin/phpunit' \n\
alias 'pf=/var/www/app/vendor/bin/phpunit --filter' \n\
alias 'p=php artisan test' \n\
alias 'pf=php artisan test --filter=' \n\
" >> ~/.bashrc

WORKDIR /var/www/app/
Expand Down
40 changes: 28 additions & 12 deletions php83.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM php:8.3.2-fpm
FROM php:8.3.8-fpm

# Update and install dependencies
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
Expand All @@ -13,29 +14,35 @@ RUN apt-get update && apt-get install -y \
libicu-dev \
ghostscript \
supervisor \
dos2unix mc htop nano wget nginx \
dos2unix \
mc \
htop \
nano \
wget \
nginx \
git \

# Nodejs
# Node.js
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g yarn \

# GD
# GD extension
&& docker-php-ext-configure gd \
--with-freetype=/usr/include/ \
--with-jpeg=/usr/include/ \
--with-freetype=/usr/include/ \
&& docker-php-ext-install gd \

# Swoole
# Swoole extension
&& pecl install swoole \
&& docker-php-ext-enable swoole \

# Redis
# Redis extension
&& pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \

# Other PHP extensions
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install zip \
&& docker-php-ext-install intl \
Expand All @@ -44,7 +51,7 @@ RUN apt-get update && apt-get install -y \
&& docker-php-ext-install pcntl \
&& docker-php-source delete \

# Postgresql
# PostgreSQL
&& apt-get install -y libpq-dev \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo pdo_pgsql pgsql \
Expand All @@ -53,10 +60,19 @@ RUN apt-get update && apt-get install -y \
&& curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin --filename=composer \

# Install Xdebug
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& echo "zend_extension=xdebug.so" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_port=9003" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \

# Aliases
&& echo "\
alias 'p=/var/www/app/vendor/bin/phpunit' \n\
alias 'pf=/var/www/app/vendor/bin/phpunit --filter' \n\
alias 'p=php artisan test' \n\
alias 'pf=php artisan test --filter=' \n\
" >> ~/.bashrc

WORKDIR /var/www/app/
Expand Down
Loading