Public | Automated Build

Last pushed: 2 years ago
Short Description
php:7.0-fpm with xdebug and some libraries for development environment
Full Description

DNXMP - Docker NginX MySQL PHP

DNXMP is a PHP-Development environment using Docker-compose.

This "Docker" environment is a NginX, MySQL, PHP-FPM based server with PhpMyAdmin and Maildev.

Docker Composition :

  • Nginx (image: nginx) -
  • MySQL (image: mysql) -
  • PHP-FPM 7.0 (FROM php:7.0-fpm) -
    • PHP ext : iconv, json, mcrypt, mbstring, mysql(only php:5.6-fpm), mysqli, pdo_mysql, pdo_sqlite, phar, curl, ftp, hash, session, simplexml, tokenizer, xml, xmlrpc, zip, intl, gd, xdebu
    • Libraries : libfreetype6-dev, libjpeg62-turbo-dev, libmcrypt-dev, libpng12-dev, libsqlite3-dev, libssl-dev, libcurl3-dev, libxml2-dev, libzzip-dev, ssmtp, libicu-dev, g++
  • PhpMyAdmin (image: phpmyadmin/phpmyadmin) -
  • MailDev (image: djfarrelly/maildev) -

Default parameters:

  • php:7.0-fpm (can be changed to php:5.6-fpm)
  • remote host for Xdebug :
  • MySQL root password : dnxmp

Ports exposed:

  • 80 : Nginx
  • 3306 : MySQL
  • 1080 : MailDev client
  • 8080 : PhpMyAdmin


DNXMP require docker and docker-compose.

First, run your docker terminal.

Then you will need to clone this repo :

$ git clone
$ cd dnxmp

You have to change the xdebug config "remote_host", in the file docker-compose.yml by your host IP address to have xdebug works:


You have to add shared folders to your docker virtual machine, in Oracle VM Virtual Box :

  • shared vm name "dnxmp_root" -> To the "root" of this repo

  • shared vm name "dnxmp_www" -> To your "www" root

You have to add the "" file to your virtual machine in this folder "/var/lib/boot2docker/" :

$ docker-machine ssh default
* "(assuming 'default' is your docker virtual machine name)"
$ sudo vi /var/lib/boot2docker/
* "paste those lines into this new file:"
mkdir -p /home/docker/dnxmp/root
mount -t vboxsf dnxmp /home/docker/dnxmp/root
mkdir -p /home/docker/dnxmp/www
mount -t vboxsf dnxmp_www /home/docker/dnxmp/www

$ sudo chmod +x /var/lib/boot2docker/

Restart your docker machine (assuming "default" is your docker virtual machine name):

$ docker-machine restart default

If you update dockerfile, do a new build :

$ docker-compose build

This will compose the containers.

You can change the MySQL root password in the file docker-compose.yml :


You can work with php:5.6-fpm, juste change in in the file docker-compose.yml :

13: image: stayfi/php56-fpm-dev


Run dnxmp by :

$ docker-machine up

At the first run, it will pull images needed if it's not yet done, and generate the MySQL database.

Assuming your default docker IP address is, you can acces to :

Web server :

To start working on your project.

PhpMyAdmin :

Web access to MySQL with the default credentials :

  • root
  • dnxmp
MailDev :

To check the mails sended by your PHP application, all mails are catched by Maildev.


If you want to use another client for MySQL.


Stayfi B. -




Fix alpine php build (add autoconf, make)


Add alpine php images


Add link to image pre builded : stayfi/php70-fpm-dev


Add php7.0-fpm

Fix tutorial in


Add link to image pre builded : stayfi/php56-fpm-dev


First version, working.


MIT license

Docker Pull Command
Source Repository