The Docker local development environment for WordPress,
allowing you to serve your projects under project-name.localhost domain.
docker network create --driver bridge reverse-proxy
docker run -d --name nginx-proxy --net reverse-proxy -p 80:80 --restart unless-stopped -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
Open up docker-compose.yml file, search and replace all occurrences of example in the file to the project name of your choice. Save changes and run docker-compose up
in the terminal.
If you would like to serve your websites with different suffix then .localhost you can use dnsmasq. Here is a guide how to do this.