


The –v argument tells docker to mount a directory in our home directory called Sites//htdocs to the /var/.We’re going to call our container php71-apache-example with the –name argument.The -d argument says that the container is going to run in detached mode, meaning we don’t need to interact with it or keep it running in the foreground.First we tell docker that we want to run a container with the run sub-command.This is a little complicated so we’ll step through each bit. e XDEBUG_CONFIG="remote_host=$(ipconfig getifaddr en0)" Change the location of your website code as needed. Let’s spin her up! Here’s the command to do it. The -t argument specifies that our image will be named ‘php71-apache’. From within the php71-apache directory, run the following command. Now that our configuration is all set up, it’s time to build the image. Line 7: Allow access to the container’s port 80. Line 6: Copy the xdebug.ini file to the image. Line 5: (optional) Copy our php.ini file to the image. Line 4: Install the Xdebug extension via PECL. Line 3: We enable the rewrite Apache module because most of my projects need it. More information about installing PHP extensions in containers can be found on the PHP repository page for Docker under the How to install more PHP extensions section. Line 2: Runs a script that will install the mysqli PHP extension. Line 1: Specifies the base image from which we’re building our custom image. FROM php:7.1-apacheĬOPY xdebug.ini /usr/local/etc/php/conf.d Let’s move on to creating our Dockerfile . Now that our configuration files are complete. The second configuration file is for Xdebug. This one-liner will keep PHP from complaining about setting a time-zone. Let’s create a directory where we’ll store the files that we’re creating.

Some familiarity with the command line is assumed. If you don’t already have it installed, get Docker for your platform here.

" article walks through setting up Xdebug on a Docker container running Apache with PHP 7.1."." - must set it to the directory of JDK11+, used for vscode-java plugin.Use VSCode to open the code /fe directoryĬreate settings.json in. JDK11+ (Java Extension Pack need JDK11+) (author is creating a lib directory under home, and install JDK11 and JDK8 in it, and use them for Extensions and Compilation).Some developers are building FE development environment on a development machine/WSL/docker, but this kind of development environment is not supported for local development, some developers are used to use VSCode to configure remote develop and debug. FE development and debugging environment - Visual Studio Code (VSCode) Apache Doris Be development and debugging in VS Code
