The Docker local development environment for WordPress.
It allows 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
docker exec -it nginx-proxy /bin/bash
cd /etc/nginx/conf.d/
echo "client_max_body_size 0;" > uploadsize.conf
Open do docker-compose.yml file, search and replace all example occurrences 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.