![]() With Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans php.ini ![]() With Zend OPcache v8.0.8, Copyright (c), by Zend Technologies Zend Engine v4.0.8, Copyright (c) Zend Technologies You can confirm that Xdebug is installed by spinning up the container after building it and checking the php version running in the container. This creates a multistage build which avoids having to rebuild the original image just to load/unload Xdebug. docker/8.0 dockerfile: Dockerfile args: Finally, in the Dockerfile, we need to make a couple of changes.Įdit the firstline in the Dockerfile to name the build/image: FROM ubuntu:21.04 AS php-base-8Īnd then add the following to the bottom of the file: FROM php-base-8 Then, edit your docker-compose.yml so that you pass this value as an argument into PHP container you're spinning up to run the app locally: services: laravel.test: build: context. ![]() Xdebug configuration for your Docker containersįirst up, you should have an APP_DEBUG=true entry in you local. If you've already started using Sail or Docker, then make sure to shut down any containers your project is running either with a sail down -v or docker-compose down -v. Publishing the Dockerfiles will create a couple of different configurations in a docker directory, and update the project's docker-composer.yml file to point to them instead of the original vendor files. ![]() If you are creating a fresh Laravel application with Sail, I recommend publishing the Dockerfiles and modifying before starting the containers with sail up, otherwise you might have to go through a couple of length build processes. In order to take control of your container setups, you should publish Sail's Dockerfiles: php artisan sail:publish Sail is a command-line tool that helps you set up a Docker-based containerized development environment, along with some helpers to work with the various containers. Recently I figured I'd give Laravel Sail a whirl, since it's now the recommended way to spin up a new development project. HorusKol - Running tests and debugging containerized apps in PhpStorm HorusKol posts bytes apps about rss Running tests and debugging containerized apps in PhpStorm
0 Comments
Leave a Reply. |