This is super clean docker setup for Laravel 8 application. you can adjust it according to your needs
- PHP 8
- Laravel 8 compatible
- Mysql
- Nginx
- create new directory named
code
and put your laravel code insidecode
directory - run
docker-compose up -d
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=root
Check the follwing link and customize the Dockerfile according to your need