Dockerized PHP development stack: Nginx, MySQL, PHP-FPM, Phpmyadmin
PHP development environment gives you everything you need for developing PHP applications locally. I hope you'll find it as useful an addition to your dev-arsenal as I've found it!
-
Linux (or a VM)
-
Get docker
-
Get docker-compose
-
Get dnsmasq (for Ubuntu
sudo apt-get install dnsmasq
) -
Create a dnsmasq config file:
- Put the following content in /etc/dnsmasq.d/docker_dns.conf
address=/dev/127.0.0.1
-
Run the following comand (only after installing docker)
docker run -d -t --restart=always -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro --name=nginx-domain-proxy jwilder/nginx-proxy
docker network create -d bridge my-network
docker network connect my-network nginx-domain-proxy
-
reboot
$ docker-compose up
Copyright © 2016 Daniel Dias Branco Arthaud. Licensed under the terms of the MIT license.