PHPackages                             jlucki/docker-php-dev-env - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. jlucki/docker-php-dev-env

ActiveProject[DevOps &amp; Deployment](/categories/devops)

jlucki/docker-php-dev-env
=========================

A simple web development environment using Docker with NGINX, PHP, MySQL and Xdebug.

v1.7(5mo ago)2917113MITDockerfile

Since Feb 17Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/jlucki/docker-php-dev-env)[ Packagist](https://packagist.org/packages/jlucki/docker-php-dev-env)[ RSS](/packages/jlucki-docker-php-dev-env/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (8)DependenciesVersions (9)Used By (0)

Docker PHP Development Environment
==================================

[](#docker-php-development-environment)

This repository allows you to quickly get a development environment up and running using Docker, including a MySQL database and some debugging tools.

This environment includes the latest versions of the following software:

- `nginx:alpine`
- `php:8.5-fpm`
- `mysql:latest`
- `xdebug`

Prerequisites
-------------

[](#prerequisites)

- Docker -
- Tested and confirmed working on:
    - macOS 15.7.1 (Sequoia)
    - Windows 10 Version 21H1 build 19043.1165

Project Setup
-------------

[](#project-setup)

Run `composer create-project jlucki/docker-php-dev-env "project_name"`

Alternatively, download the files from this repo and copy them to your project directory.

Running the Container
---------------------

[](#running-the-container)

1. Run `docker compose up -d` from the project directory
    - The above command will only work on versions newer than 3.6. If you are using Docker 3.6 or older, use `docker-compose up -d`
    - You can check running containers withg `docker ps`
2. Visit `localhost` in your browser

Setting up Xdebug in Your IDE
-----------------------------

[](#setting-up-xdebug-in-your-ide)

*The following instructions are for PHPStorm.*

1. Click on Run &gt; Edit Configurations
2. Click the `+` and add a new PHP Remote Debug configuration
3. Give the configuration a name
4. Tick *Filter debug connection by IDE key*
5. Add `PHPSTORM` in the session id
6. Click the `...` next to Server
7. Click the `+` to add a new server
8. Give the server a name, and set the host to `localhost`
9. Tick *Use path mappings*
10. Under the `Project files` file/directory, next to your project folder, for the `Absolute path on the server` column add `/var/www/html`
11. Hit Apply and OK until you've returned to the IDE
12. Click the *Start Listening for PHP Debug Connections* icon
13. Set a breakpoint in your code
14. Refresh the page in your browser
15. Accept *Incoming Connection From Xdebug*
16. Happy debugging!

See  for how to enable xdebug sessions.

Additional Notes
----------------

[](#additional-notes)

For database connections, use `mysql` as the hostname. If you would like a different hostname, change the service name in the `docker-compose.yml` file.

Windows 10 Troubleshooting
--------------------------

[](#windows-10-troubleshooting)

For troubleshooting tips see the [wiki](https://github.com/jlucki/docker-php-dev-env/wiki/Windows-Troubleshooting/).

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance71

Regular maintenance activity

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~302 days

Recently: every ~340 days

Total

8

Last Release

165d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/166e9750b5ae6192f2bc60b0c71db361cadb38d37f381d5f767236a5c00eacc9?d=identicon)[jlucki](/maintainers/jlucki)

---

Top Contributors

[![jlucki](https://avatars.githubusercontent.com/u/30590452?v=4)](https://github.com/jlucki "jlucki (16 commits)")[![asheroto](https://avatars.githubusercontent.com/u/49938263?v=4)](https://github.com/asheroto "asheroto (1 commits)")

---

Tags

phpXdebugenvironmentdevelopmentdockernginx

### Embed Badge

![Health badge](/badges/jlucki-docker-php-dev-env/health.svg)

```
[![Health](https://phpackages.com/badges/jlucki-docker-php-dev-env/health.svg)](https://phpackages.com/packages/jlucki-docker-php-dev-env)
```

###  Alternatives

[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[ryoluo/sail-ssl

Laravel Sail plugin to enable SSL (HTTPS) connection with Nginx.

188672.6k2](/packages/ryoluo-sail-ssl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
