
Then, run the commands to build and run the Docker image: $ docker build -t my-php-app. How to use this image Create a Dockerfile in your PHP project FROM php:7.4-cli PHP code is usually processed by an interpreter, which is either implemented as a native module on the web-server or as a common gateway interface (CGI). PHP can be added to straight HTML or it can be used with a variety of templating engines and web frameworks. PHP is a server-side scripting language designed for web development, but which can also be used as a general-purpose programming language. Official-images repo's library/php file ( history) Official-images PRs with label library/php Repo-info repo's repos/php/ directory ( history) See docker/hub-beta-feedback#238 for more information. Note: the description for this image is longer than the Hub length limit of 25000, so the "Supported tags" list has been trimmed to compensate. Supported tags and respective Dockerfile links With Zend OPcache v8.1.The Docker Community Forums, the Docker Community Slack, or Stack Overflow

With Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans Zend Engine v4.1.8, Copyright (c) Zend Technologies Install ok: channel:///xdebug-3.1.5Ī quick test shows that all is now as it should ~ $ php -v So to fix, I created the directory and installed Xdebug again: Investigating, I found that /opt/homebrew/Cellar/php/8.1.8/pecl is a symlink to /opt/homebrew/lib/php/pecl, however, this directory doesn’t exist. PHP Warning: mkdir(): File exists in /opt/homebrew/Cellar/php/8.1.8/share/php/pear/System.php on line 294ĮRROR: failed to mkdir /opt/homebrew/Cellar/php/8.1.8/pecl/20210902 Starting to download xdebug-3.1.5.tgz (232,070 bytes) This whirrs and clicks for a while downloading and compiling the xdebug.so and then fails ~ $ pecl install xdebug Homebrew is always up to date, so it installed PHP 8.1 for me.Īgain, as usual, I installed Xdebug using pecl install xdebug.


I have recently set up a new M2 MacBook Air and as usual, installed Homebrew and then installed PHP.
