valet stop
composer create-project laravel/laravel doc --prefer-dist
cd doc
code .
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=doc
DB_USERNAME=root
DB_PASSWORD=root
git clone https://github.com/Laradock/laradock.git
cd laradock
cp env-example .env
docker-compose up -d nginx mysql phpmyadmin redis workspace
docker ps
// Also, you can restart your containers using the following command.
docker restart $(docker ps -q)
// You can kill all the containers using the following command.
docker kill $(docker ps -a -q)
// You can stop all the containers using the following command.
docker stop $(docker ps -aq)
// Now, again restart your container, if you have stopped your container.
docker-compose up -d nginx mysql phpmyadmin
docker-compose exec workspace bash
php artisan migrate
when it won't migrate and you can't access to db :
docker-compose exec mysql bash
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';
ALTER USER 'default'@'%' IDENTIFIED WITH mysql_native_password BY 'secret';