From 0676b669e38586daa56859f6c0485fde61d06827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 08:11:41 +0200 Subject: [PATCH 01/20] Updated to PHP7.2 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 43c1599..4dd61fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update && apt-get install -y software-properties-common python-softw curl -sL https://deb.nodesource.com/setup_5.x | bash - && \ apt-get update && \ apt-get install -y --allow-unauthenticated graphviz phpunit nodejs \ - php7.1-cli php7.1-dev php7.1-curl php7.1-gd php7.1-gmp php7.1-json php7.1-ldap php7.1-mysql php7.1-odbc php7.1-pgsql php7.1-pspell php7.1-readline php7.1-recode php7.1-sqlite3 php7.1-tidy php7.1-xml php7.1-xmlrpc php7.1-bcmath php7.1-bz2 php7.1-enchant php7.1-imap php7.1-interbase php7.1-intl php7.1-mbstring php7.1-mcrypt php7.1-soap php7.1-sybase php7.1-xsl php7.1-zip php-memcache php-memcached php-pear \ + php7.2-cli php7.2-dev php7.2-curl php7.2-gd php7.2-gmp php7.2-json php7.2-ldap php7.2-mysql php7.2-odbc php7.2-pgsql php7.2-pspell php7.2-readline php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xml php7.2-xmlrpc php7.2-bcmath php7.2-bz2 php7.2-enchant php7.2-imap php7.2-interbase php7.2-intl php7.2-mbstring php7.2-mcrypt php7.2-soap php7.2-sybase php7.2-xsl php7.2-zip php-memcache php-memcached php-pear \ openjdk-8-jre libxext-dev libxrender-dev libxtst-dev && \ pecl install xdebug && \ apt-get clean && \ From da3a176fd5517c3b63a8ae6b69fd01cff6671d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 08:54:21 +0200 Subject: [PATCH 02/20] removed deprecated python-software-properties package from installation chain --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4dd61fb..3bf1abf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ FROM ubuntu:16.04 MAINTAINER Iain Mckay "me@iainmckay.co.uk" -RUN apt-get update && apt-get install -y software-properties-common python-software-properties && add-apt-repository ppa:ondrej/php && apt-get update && \ +RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository ppa:ondrej/php && apt-get update && \ apt-get install -y software-properties-common wget git curl && \ - curl -sL https://deb.nodesource.com/setup_5.x | bash - && \ + curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ apt-get update && \ apt-get install -y --allow-unauthenticated graphviz phpunit nodejs \ php7.2-cli php7.2-dev php7.2-curl php7.2-gd php7.2-gmp php7.2-json php7.2-ldap php7.2-mysql php7.2-odbc php7.2-pgsql php7.2-pspell php7.2-readline php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xml php7.2-xmlrpc php7.2-bcmath php7.2-bz2 php7.2-enchant php7.2-imap php7.2-interbase php7.2-intl php7.2-mbstring php7.2-mcrypt php7.2-soap php7.2-sybase php7.2-xsl php7.2-zip php-memcache php-memcached php-pear \ From f75fe79ef1bc7f1b2e40bedbf95a3dccc5f6e17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 09:03:27 +0200 Subject: [PATCH 03/20] Updated PhpStorm to 2018.2 --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3bf1abf..7990ec4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,11 +14,11 @@ RUN apt-get update && apt-get install -y software-properties-common && add-apt-r rm -rf /tmp/* RUN useradd -m -s /bin/bash developer \ - && mkdir /home/developer/.PhpStorm2017.1 \ - && touch /home/developer/.PhpStorm2017.1/.keep \ + && mkdir /home/developer/.PhpStorm2018.2 \ + && touch /home/developer/.PhpStorm2018.2/.keep \ && chown -R developer.developer /home/developer \ && mkdir /opt/phpstorm \ - && wget -O - https://download.jetbrains.com/webide/PhpStorm-2017.1.tar.gz | tar xzf - --strip-components=1 -C "/opt/phpstorm" + && wget -O - https://download.jetbrains.com/webide/PhpStorm-2018.2.tar.gz | tar xzf - --strip-components=1 -C "/opt/phpstorm" RUN php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin RUN phpenmod curl gd gmp json ldap mysql odbc pgsql pspell readline recode snmp sqlite3 tidy xml xmlrpc bcmath bz2 enchant imap interbase intl mbstring mcrypt soap sybase xsl zip xdebug memcache memcached @@ -28,5 +28,5 @@ RUN pear install PHP_CodeSniffer RUN npm install -g bower USER developer -VOLUME /home/developer/.PhpStorm2017.1 +VOLUME /home/developer/.PhpStorm2018.2 CMD /opt/phpstorm/bin/phpstorm.sh From 23cf4413a1361ed0a16bfb582c96f3d43c361265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 12:46:24 +0200 Subject: [PATCH 04/20] Fix UTF-8 problems installing ondrej packages --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7990ec4..bc41997 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:16.04 MAINTAINER Iain Mckay "me@iainmckay.co.uk" -RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository ppa:ondrej/php && apt-get update && \ +RUN apt-get update && apt-get install -y software-properties-common && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php && apt-get update && \ apt-get install -y software-properties-common wget git curl && \ curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ apt-get update && \ From 12285282c43b8c4db99acef96c3bea53a8865cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 13:28:21 +0200 Subject: [PATCH 05/20] Remove mcrypt, as it is deprecated in 7.2 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bc41997..4cd1bab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update && apt-get install -y software-properties-common && LC_ALL=C. curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ apt-get update && \ apt-get install -y --allow-unauthenticated graphviz phpunit nodejs \ - php7.2-cli php7.2-dev php7.2-curl php7.2-gd php7.2-gmp php7.2-json php7.2-ldap php7.2-mysql php7.2-odbc php7.2-pgsql php7.2-pspell php7.2-readline php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xml php7.2-xmlrpc php7.2-bcmath php7.2-bz2 php7.2-enchant php7.2-imap php7.2-interbase php7.2-intl php7.2-mbstring php7.2-mcrypt php7.2-soap php7.2-sybase php7.2-xsl php7.2-zip php-memcache php-memcached php-pear \ + php7.2-cli php7.2-dev php7.2-curl php7.2-gd php7.2-gmp php7.2-json php7.2-ldap php7.2-mysql php7.2-odbc php7.2-pgsql php7.2-pspell php7.2-readline php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xml php7.2-xmlrpc php7.2-bcmath php7.2-bz2 php7.2-enchant php7.2-imap php7.2-interbase php7.2-intl php7.2-mbstring php7.2-soap php7.2-sybase php7.2-xsl php7.2-zip php-memcache php-memcached php-pear \ openjdk-8-jre libxext-dev libxrender-dev libxtst-dev && \ pecl install xdebug && \ apt-get clean && \ From 00dc8781d494a844b65ebf86ccf8f16e9d9885ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 21:50:43 +0200 Subject: [PATCH 06/20] Updated to PhpStorm2018.2.3 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4cd1bab..0ba09a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN useradd -m -s /bin/bash developer \ && touch /home/developer/.PhpStorm2018.2/.keep \ && chown -R developer.developer /home/developer \ && mkdir /opt/phpstorm \ - && wget -O - https://download.jetbrains.com/webide/PhpStorm-2018.2.tar.gz | tar xzf - --strip-components=1 -C "/opt/phpstorm" + && wget -O - https://download.jetbrains.com/webide/PhpStorm-2018.2.3.tar.gz | tar xzf - --strip-components=1 -C "/opt/phpstorm" RUN php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin RUN phpenmod curl gd gmp json ldap mysql odbc pgsql pspell readline recode snmp sqlite3 tidy xml xmlrpc bcmath bz2 enchant imap interbase intl mbstring mcrypt soap sybase xsl zip xdebug memcache memcached From 49f1b838760a031cfab8af3d618b8fe8c4b2971f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 21:51:46 +0200 Subject: [PATCH 07/20] Added Xdebug template to use for applications debugging --- xdebug.ini | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 xdebug.ini diff --git a/xdebug.ini b/xdebug.ini new file mode 100644 index 0000000..667b587 --- /dev/null +++ b/xdebug.ini @@ -0,0 +1,14 @@ +[xdebug] +zend_extension=${PHP_ZEND_EXTENSION} +xdebug.default_enable=${PHP_XDEBUG_DEFAULT_ENABLE} +xdebug.remote_enable=${PHP_XDEBUG_REMOTE_ENABLE} +xdebug.remote_handler=dbgp +xdebug.remote_port=${PHP_XDEBUG_REMOTE_PORT} +xdebug.remote_host=${PHP_XDEBUG_REMOTE_HOST} +xdebug.remote_autostart=${PHP_XDEBUG_REMOTE_AUTO_START} +xdebug.remote_connect_back=${PHP_XDEBUG_REMOTE_CONNECT_BACK} +xdebug.idekey=${PHP_XDEBUG_IDEKEY} + +; profiler +xdebug.profiler_enable = ${PHP_XDEBUG_PROFILER_ENABLE} +xdebug.profiler_output_dir = ${PHP_XDEBUG_PROFILER_OUTPUT_DIR} From d0d01dd85cc5ea6a61d894310460f483bbc5b13a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 21:53:15 +0200 Subject: [PATCH 08/20] Added xdebug template config file values setup --- Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0ba09a6..8614f11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,18 @@ FROM ubuntu:16.04 MAINTAINER Iain Mckay "me@iainmckay.co.uk" +ENV COMPOSER_ALLOW_SUPERUSER 1 +ENV PHP_ZEND_EXTENSION ${PHP_ZEND_EXTENSION:-"zend_extension=/usr/lib/php/20170718/xdebug.so"} +ENV PHP_XDEBUG_DEFAULT_ENABLE ${PHP_XDEBUG_DEFAULT_ENABLE:-1} +ENV PHP_XDEBUG_REMOTE_ENABLE ${PHP_XDEBUG_REMOTE_ENABLE:-1} +ENV PHP_XDEBUG_REMOTE_HOST ${PHP_XDEBUG_REMOTE_HOST:-"127.0.0.1"} +ENV PHP_XDEBUG_REMOTE_PORT ${PHP_XDEBUG_REMOTE_PORT:-9000} +ENV PHP_XDEBUG_REMOTE_AUTO_START ${PHP_XDEBUG_REMOTE_AUTO_START:-1} +ENV PHP_XDEBUG_REMOTE_CONNECT_BACK ${PHP_XDEBUG_REMOTE_CONNECT_BACK:-1} +ENV PHP_XDEBUG_IDEKEY ${PHP_XDEBUG_IDEKEY:-docker} +ENV PHP_XDEBUG_PROFILER_ENABLE ${PHP_XDEBUG_PROFILER_ENABLE:-0} +ENV PHP_XDEBUG_PROFILER_OUTPUT_DIR ${PHP_XDEBUG_PROFILER_OUTPUT_DIR:-"/tmp"} + RUN apt-get update && apt-get install -y software-properties-common && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php && apt-get update && \ apt-get install -y software-properties-common wget git curl && \ curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ From 9e01acfcb6a4ca3270139861706075899ee0f92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 21:53:52 +0200 Subject: [PATCH 09/20] Instructed to copy xdebug template to available-mods for next command usage --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8614f11..43144a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,8 @@ RUN apt-get update && apt-get install -y software-properties-common && LC_ALL=C. rm -rf /var/lib/apt/lists/* && \ rm -rf /tmp/* +COPY xdebug.ini /etc/php/7.2/mods-available/xdebug.ini + RUN useradd -m -s /bin/bash developer \ && mkdir /home/developer/.PhpStorm2018.2 \ && touch /home/developer/.PhpStorm2018.2/.keep \ From 7e8d2f0654ea550d204954f59cc4765fb09595b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 21:54:28 +0200 Subject: [PATCH 10/20] Removed php mods without configuration in mods-available --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 43144a1..e2683ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ RUN useradd -m -s /bin/bash developer \ && wget -O - https://download.jetbrains.com/webide/PhpStorm-2018.2.3.tar.gz | tar xzf - --strip-components=1 -C "/opt/phpstorm" RUN php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin -RUN phpenmod curl gd gmp json ldap mysql odbc pgsql pspell readline recode snmp sqlite3 tidy xml xmlrpc bcmath bz2 enchant imap interbase intl mbstring mcrypt soap sybase xsl zip xdebug memcache memcached +RUN phpenmod curl gd gmp json ldap mysql odbc pgsql pspell readline recode sqlite3 tidy xml xmlrpc bcmath bz2 enchant imap interbase intl mbstring soap xsl zip xdebug memcache memcached #RUN php5enmod mcrypt curl RUN wget -c http://static.phpmd.org/php/latest/phpmd.phar -O /usr/bin/phpmd.phar && chmod +x /usr/bin/phpmd.phar RUN pear install PHP_CodeSniffer From 55064c8f4db3919e61363d14a40cbd1c5a748088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 21:55:38 +0200 Subject: [PATCH 11/20] Finally copy edited xdebug to config php cli directory with all values set --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index e2683ed..9f06e7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,6 +41,8 @@ RUN wget -c http://static.phpmd.org/php/latest/phpmd.phar -O /usr/bin/phpmd.phar RUN pear install PHP_CodeSniffer RUN npm install -g bower +COPY xdebug.ini /etc/php/7.2/cli/conf.d/20-xdebug-dev.ini + USER developer VOLUME /home/developer/.PhpStorm2018.2 CMD /opt/phpstorm/bin/phpstorm.sh From a0336d9cb8bc3fc6a9c485fd5acfc8debbc00a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 21:57:17 +0200 Subject: [PATCH 12/20] Update README for php and PhpStorm versions --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bb40208..16a3985 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # docker-phpstorm -Jetbrains PhpStorm 2017.1 running inside a docker container. This project is derived from [`fgrehm/docker-netbeans`](https://github.com/fgrehm/docker-netbeans). +Jetbrains PhpStorm 2018.2 running inside a docker container. This project is derived from [`fgrehm/docker-netbeans`](https://github.com/fgrehm/docker-netbeans). ## Features -* PhpStorm 2017.1 -* PHP 7.1 +* PhpStorm 2018.2.3 +* PHP 7.2 * composer * graphviz @@ -19,12 +19,12 @@ To launch PhpStorm we need to provide the current display and your X11 socket. Y $ docker run -it --rm \ -e DISPLAY=$DISPLAY \ -v /tmp/.X11-unix:/tmp/.X11-unix \ - -v ~/.PhpStorm2017.1:/home/developer/.PhpStorm2017.1 \ + -v ~/.PhpStorm2018.2:/home/developer/.PhpStorm2018.2 \ -v ~/Projects:/workspace \ - iainmckay/phpstorm:2017.1-php7 + iainmckay/phpstorm:2018.2-php7 ``` -With this your configuration will be persisted to `/home//.PhpStorm2017.1` so that you don't lose it over subsequent runs. It also makes any sourcecode under `/home//Projects` available to PhpStorm. Inside the dockerized environment, it will be available through `/workspace`. +With this your configuration will be persisted to `/home//.PhpStorm2018.2` so that you don't lose it over subsequent runs. It also makes any sourcecode under `/home//Projects` available to PhpStorm. Inside the dockerized environment, it will be available through `/workspace`. Note: Remember to change the ownership of the config directory on the host as it will be created as root if it does not already exist and PhpStorm won't be able to write to it. From 8f107def6db2eb35bbf8daee1d2c2ed500d07391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 17 Sep 2018 22:00:23 +0200 Subject: [PATCH 13/20] Updated the launcher to point to current version --- support/launcher/phpstorm.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/launcher/phpstorm.desktop b/support/launcher/phpstorm.desktop index 13e339b..de91b4d 100644 --- a/support/launcher/phpstorm.desktop +++ b/support/launcher/phpstorm.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Name=PhpStorm -Exec=sh -c "docker run --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/.PhpStorm2016.3:/home/developer/.PhpStorm2016.3 -v ~/Projects:/workspace iainmckay/phpstorm:2016.3.1-php7" +Exec=sh -c "docker run --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/.PhpStorm2018.2:/home/developer/.PhpStorm2018.2 -v ~/Projects:/workspace iainmckay/phpstorm:2018.2-php7" Icon=phpstorm Terminal=false Type=Application From c59a4a3cc9f32abab1cbce15b1564553b4e81866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Tue, 18 Sep 2018 20:56:05 +0200 Subject: [PATCH 14/20] Prepend other commands with environmental variables setup --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9f06e7e..9c3e637 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,8 @@ ENV PHP_XDEBUG_IDEKEY ${PHP_XDEBUG_IDEKEY:-docker} ENV PHP_XDEBUG_PROFILER_ENABLE ${PHP_XDEBUG_PROFILER_ENABLE:-0} ENV PHP_XDEBUG_PROFILER_OUTPUT_DIR ${PHP_XDEBUG_PROFILER_OUTPUT_DIR:-"/tmp"} -RUN apt-get update && apt-get install -y software-properties-common && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php && apt-get update && \ +RUN set -ex && \ + apt-get update && apt-get install -y software-properties-common && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php && apt-get update && \ apt-get install -y software-properties-common wget git curl && \ curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ apt-get update && \ From 8b09ffaa0930d808bd12c462d9781ca7e11a7296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Tue, 18 Sep 2018 20:57:05 +0200 Subject: [PATCH 15/20] It's hard to live without vim --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9c3e637..9fb61f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN set -ex && \ apt-get install -y software-properties-common wget git curl && \ curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ apt-get update && \ - apt-get install -y --allow-unauthenticated graphviz phpunit nodejs \ + apt-get install -y --allow-unauthenticated vim graphviz phpunit nodejs \ php7.2-cli php7.2-dev php7.2-curl php7.2-gd php7.2-gmp php7.2-json php7.2-ldap php7.2-mysql php7.2-odbc php7.2-pgsql php7.2-pspell php7.2-readline php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xml php7.2-xmlrpc php7.2-bcmath php7.2-bz2 php7.2-enchant php7.2-imap php7.2-interbase php7.2-intl php7.2-mbstring php7.2-soap php7.2-sybase php7.2-xsl php7.2-zip php-memcache php-memcached php-pear \ openjdk-8-jre libxext-dev libxrender-dev libxtst-dev && \ pecl install xdebug && \ From 94c2605d67880d8d73048619fe75465fa9fe63b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Tue, 18 Sep 2018 20:57:25 +0200 Subject: [PATCH 16/20] Rename unusual xdebug config name --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9fb61f8..a96ffb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,7 @@ RUN wget -c http://static.phpmd.org/php/latest/phpmd.phar -O /usr/bin/phpmd.phar RUN pear install PHP_CodeSniffer RUN npm install -g bower -COPY xdebug.ini /etc/php/7.2/cli/conf.d/20-xdebug-dev.ini +COPY xdebug.ini /etc/php/7.2/cli/conf.d/20-xdebug.ini USER developer VOLUME /home/developer/.PhpStorm2018.2 From 8f064c990d59da1d7bd6a4bd7e8a7bcc2af06c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Tue, 18 Sep 2018 21:00:14 +0200 Subject: [PATCH 17/20] Added an example env to be loaded with --- .env.example | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..f0d8636 --- /dev/null +++ b/.env.example @@ -0,0 +1,10 @@ +PHP_ZEND_EXTENSION="zend_extension=/usr/lib/php/20170718/xdebug.so" +PHP_XDEBUG_DEFAULT_ENABLE=0 +PHP_XDEBUG_REMOTE_ENABLE=0 +PHP_XDEBUG_REMOTE_HOST=127.0.0.1 +PHP_XDEBUG_REMOTE_PORT=9001 +PHP_XDEBUG_REMOTE_AUTO_START=0 +PHP_XDEBUG_REMOTE_CONNECT_BACK=0 +PHP_XDEBUG_IDEKEY=docker +PHP_XDEBUG_PROFILER_ENABLE=0 +PHP_XDEBUG_PROFILER_OUTPUT_DIR=/tmp From 11014278f8642aef8d69c2b9a96bcb9731ddd093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Tue, 18 Sep 2018 21:03:39 +0200 Subject: [PATCH 18/20] Extended the instructions --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 16a3985..c03456d 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,10 @@ With this your configuration will be persisted to `/home//.PhpStorm2018.2` Note: Remember to change the ownership of the config directory on the host as it will be created as root if it does not already exist and PhpStorm won't be able to write to it. +## Xdebug + +An environmental values for xdebug.ini configuration may be setup from an example .env.example and appending `--env ` to the command + ## Adding to your launcher There is a desktop launcher provided in `support/launcher`. You should place `phpstorm.desktop` in `~/.local/share/applications` and place `phpstorm.png` in `~/.local/share/icons`. From ea519a260644aa77e05a377684c24f6379356e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 15 Oct 2018 20:02:30 +0200 Subject: [PATCH 19/20] Fixed wrongly hardcoded xdebug path --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a96ffb1..ff41903 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:16.04 MAINTAINER Iain Mckay "me@iainmckay.co.uk" ENV COMPOSER_ALLOW_SUPERUSER 1 -ENV PHP_ZEND_EXTENSION ${PHP_ZEND_EXTENSION:-"zend_extension=/usr/lib/php/20170718/xdebug.so"} +ENV PHP_ZEND_EXTENSION ${PHP_ZEND_EXTENSION:-"/usr/lib/php/20170718/xdebug.so"} ENV PHP_XDEBUG_DEFAULT_ENABLE ${PHP_XDEBUG_DEFAULT_ENABLE:-1} ENV PHP_XDEBUG_REMOTE_ENABLE ${PHP_XDEBUG_REMOTE_ENABLE:-1} ENV PHP_XDEBUG_REMOTE_HOST ${PHP_XDEBUG_REMOTE_HOST:-"127.0.0.1"} From 379128e8ba8abf0d10a659b0bde45605a786fa38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sola?= Date: Mon, 15 Oct 2018 20:03:35 +0200 Subject: [PATCH 20/20] Same error in example env file fixed --- .env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.example b/.env.example index f0d8636..b9ec8f6 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -PHP_ZEND_EXTENSION="zend_extension=/usr/lib/php/20170718/xdebug.so" +PHP_ZEND_EXTENSION="/usr/lib/php/20170718/xdebug.so" PHP_XDEBUG_DEFAULT_ENABLE=0 PHP_XDEBUG_REMOTE_ENABLE=0 PHP_XDEBUG_REMOTE_HOST=127.0.0.1