laravel-docker-php7.4

Step 1:

Install docker if it's not exists in your system

Step 2:

sudo docker ps

checks the list of containers running

Step 3:

move to docker folder and execute -

sudo docker-compose up -d

to run docker

Note: if you are running on macOs then add this line to the 'docker-compose.yml' file

platform: linux/x86_64

Step 4:

sudo docker exec -it laravel-app sh

to run laravelapp container

Step 5:

Run commands for install composer packages for laravel

Step 6 :

Set up your .env file database

DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=laravel-app
DB_USERNAME=root
DB_PASSWORD=root