A streamlined docker setup for laravel development. Provides a minimal, fast, and robust environment suitable for local development, CI pipelines, and prototyping.
- make
- docker 20.10+
- docker compose 2.0+
> git clone git@github.com:andrew-kandyba/laravel-docker.git
> cd laravel-docker
> make build
> make install
> make startYour application is available at: http://localhost
app/database/database.sqlite – database
.
├── app/ # Generated by make setup
├── docker/
│ ├── nginx/
│ │ └── app.conf
│ └── php/
│ ├── Dockerfile
│ ├── php.ini
│ └── www.conf
├── docker-compose.yml
└── Makefile> make build Build PHP image
> make install Install Laravel
> make lint Run linter
> make restart Restart all containers
> make shell Open shell in PHP container
> make start Start containers
> make stop Stop and remove containers
> make test Run testsPre-configured for debugging with:
- Host:
host.docker.internal - Port:
9003 - IDE Key:
PHPSTORM
- Go to Settings → PHP → Servers
- Create server with name:
laravel-sandbox - Set host:
localhost, port:80 - Enable path mappings:
./app → /var/www - Start listening for connections
Add to .vscode/launch.json:
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www": "${workspaceFolder}/app"
}
}This environment comes with Buggregator pre-configured — a local telemetry hub for Laravel development that provides:
- Mail capture (SMTP on port
1025) - VarDumper server (
9912) - XHProf / Profiler
- Inspector events
- HTTP / logs inspection
All required settings are already included in the php container.
No additional configuration is needed — Buggregator receives data automatically after starting the containers:
> make startAll telemetry becomes available in the web UI at http://localhost:8000.
This project is licensed under the MIT License - see the LICENSE file for details.