Sign inSign up

josanangel/lamp_php74_xdebug29_laravel

By josanangel

•Updated over 2 years ago

A simple enviroment setup for LAMP with: + php74 + xdebug (Apache + CLI commands) + Laravel

Image
Languages & frameworks
Web servers
0

909

josanangel/lamp_php74_xdebug29_laravel repository overview

Creating a container from image (Example)

docker  run -d --name my_container  -p 8080:80 -v "/path/to/local/project:/var/www/html/app" josanangel/lamp_php74_xdebug29_laravel

You must put your Laravel project in the directory: /var/www/html/app.

Aliases in /root/.bashrc:

  • alias pa='php artisan'
  • alias www='cd /var/www/html'
  • alias app='cd /var/www/html/app'

Remember to adapt .env :

DB_CONNECTION=mysql
DB_HOST=host.docker.internal  # <<--
DB_PORT=3306
DB_DATABASE=db_name
DB_USERNAME=db_user
DB_PASSWORD=db_password

⁠Laravel Versions Available for PHP 7.4 -- ( XDEBUG PORT: 9000 )

Laravel VersionPHP (*)
6 (LTS)7.2 - 8.0
77.2 - 8.0
87.3 - 8.1

⁠Configuring Debug in PhpStorm

Config

⁠Configuring Debug in VSCODE -- ( XDEBUG PORT: 9000 )

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9000,
            "pathMappings": {
                "/var/www/html/app": "${workspaceRoot}",
              }
        },
    ]
}

Tag summary

Content type

Image

Digest

sha256:4d3b3e8bb…

Size

128.6 MB

Last updated

over 2 years ago

docker pull josanangel/lamp_php74_xdebug29_laravel