From a1e01ac19b5550647050819472cc4eadd43cc44c Mon Sep 17 00:00:00 2001 From: Eugene Kirdzei Date: Sat, 30 Jun 2018 11:54:46 +0300 Subject: [PATCH] Install phpdbg (#1612) * Install phpdbg * Change documentstion --- DOCUMENTATION/content/documentation/index.md | 22 ++++++++++++++++++++ docker-compose.yml | 2 ++ env-example | 2 ++ php-fpm/Dockerfile | 12 +++++++++++ workspace/Dockerfile | 14 +++++++++++++ 5 files changed, 52 insertions(+) diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index 44dfd07..9c74ac3 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -297,6 +297,28 @@ e) set it to `true` For information on how to configure xDebug with your IDE and work it out, check this [Repository](https://github.com/LarryEitel/laravel-laradock-phpstorm) or follow up on the next section if you use linux and PhpStorm. +
+ +## Install phpdbg + +Install `phpdbg` in the Workspace and the PHP-FPM Containers: + +
+1 - Open the `.env`. + +2 - Search for `WORKSPACE_INSTALL_PHPDBG`. + +3 - Set value to `true` + +4 - Do the same for `PHP_FPM_INSTALL_PHPDBG` + +```dotenv +WORKSPACE_INSTALL_PHPDBG=true +``` +```dotenv +PHP_FPM_INSTALL_PHPDBG=true +``` + ## Setup remote debugging for PhpStorm on Linux diff --git a/docker-compose.yml b/docker-compose.yml index 9a74e97..c269c8f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -50,6 +50,7 @@ services: - PHP_VERSION=${PHP_VERSION} - INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION} - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG} + - INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG} - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE} - INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP} - INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP} @@ -116,6 +117,7 @@ services: args: - PHP_VERSION=${PHP_VERSION} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} + - INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG} - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE} - INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP} - INSTALL_IMAP=${PHP_FPM_INSTALL_IMAP} diff --git a/env-example b/env-example index 39d9318..92c47da 100644 --- a/env-example +++ b/env-example @@ -87,6 +87,7 @@ WORKSPACE_INSTALL_PHPREDIS=true WORKSPACE_INSTALL_WORKSPACE_SSH=false WORKSPACE_INSTALL_SUBVERSION=false WORKSPACE_INSTALL_XDEBUG=false +WORKSPACE_INSTALL_PHPDBG=false WORKSPACE_INSTALL_LDAP=false WORKSPACE_INSTALL_SOAP=false WORKSPACE_INSTALL_IMAP=false @@ -132,6 +133,7 @@ PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=true PHP_FPM_INSTALL_PHPREDIS=true PHP_FPM_INSTALL_MEMCACHED=false PHP_FPM_INSTALL_XDEBUG=false +PHP_FPM_INSTALL_PHPDBG=false PHP_FPM_INSTALL_IMAP=false PHP_FPM_INSTALL_MONGO=false PHP_FPM_INSTALL_AMQP=false diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 51cd169..92f81c1 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -109,6 +109,18 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/e sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini && \ sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini +########################################################################### +# Phpdbg: +########################################################################### + +ARG INSTALL_PHPDBG=false +ARG PHP_VERSION=${PHP_VERSION} + +RUN if [ ${INSTALL_PHPDBG} = true ]; then \ + # Load the xdebug extension only with phpunit commands + apt-get install -y --force-yes php${PHP_VERSION}-phpdbg \ +;fi + ########################################################################### # Blackfire: ########################################################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 4f5ac38..8f09e47 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -245,6 +245,20 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${P sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini && \ sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini +########################################################################### +# Phpdbg: +########################################################################### + +USER root + +ARG INSTALL_PHPDBG=false +ARG PHP_VERSION=${PHP_VERSION} + +RUN if [ ${INSTALL_PHPDBG} = true ]; then \ + # Load the xdebug extension only with phpunit commands + apt-get install -y --force-yes php${PHP_VERSION}-phpdbg \ +;fi + ########################################################################### # Blackfire: ###########################################################################