Docker
git clone https://github.com/xaviercry/docker-laravel
cd docker-laravel
docker build -t laravel
docker run -d --name laravel -p8080:80 -p443:443 -v <your-laravel-project>:/var/www/default/ laravel
你可以加上
-v <nginx-conf-dir>:/etc/nginx/sites-enabled/
来随时更改nginx配置文件 Use-v <nginx-conf-dir>:/etc/nginx/sites-enabled/
to edit the nginx conf anytime
docker exec -it laravel /bin/bash
cd /var/www/
laravel new <your-project-name>
rm -rf default && mv <your-project-name> default